Fix for slow startup time on GraalVM 20 (#288)
This commit is contained in:
parent
0b23dd0fdb
commit
5723206ca2
2 changed files with 22 additions and 0 deletions
19
resources/CutOffCoreServicesDependencies.java
Normal file
19
resources/CutOffCoreServicesDependencies.java
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import org.graalvm.nativeimage.Platform;
|
||||
import org.graalvm.nativeimage.Platforms;
|
||||
import com.oracle.svm.core.annotate.TargetClass;
|
||||
import com.oracle.svm.core.annotate.Delete;
|
||||
|
||||
public final class CutOffCoreServicesDependencies {
|
||||
}
|
||||
|
||||
// @Platforms(Platform.DARWIN.class)
|
||||
// @TargetClass(className = "sun.net.spi.DefaultProxySelector")
|
||||
// @Delete
|
||||
// final class Target_sun_net_spi_DefaultProxySelector {
|
||||
// }
|
||||
|
||||
@Platforms(Platform.DARWIN.class)
|
||||
@TargetClass(className = "apple.security.KeychainStore")
|
||||
@Delete
|
||||
final class Target_apple_security_KeychainStore {
|
||||
}
|
||||
|
|
@ -17,6 +17,8 @@ BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
|
|||
|
||||
export JAVA_HOME=$GRAALVM_HOME
|
||||
|
||||
$GRAALVM_HOME/bin/javac -cp $GRAALVM_HOME/jre/lib/svm/builder/svm.jar resources/CutOffCoreServicesDependencies.java
|
||||
|
||||
lein with-profiles +reflection do run
|
||||
lein do clean, uberjar
|
||||
|
||||
|
|
@ -37,6 +39,7 @@ args=( -jar target/babashka-$BABASHKA_VERSION-standalone.jar \
|
|||
--verbose \
|
||||
--no-fallback \
|
||||
--no-server \
|
||||
--report-unsupported-elements-at-runtime \
|
||||
"$BABASHKA_XMX" )
|
||||
|
||||
if [ "$BABASHKA_STATIC" = "true" ]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue