https://medium.com/graalvm/compressed-graalvm-native-images-4d233766a214
@zane I have tried upx and found it to have a pretty negative impact on startup time.
$ time ./bb '(+ 1 2 3)'
6
./bb '(+ 1 2 3)' 0.19s user 0.03s system 98% cpu 0.229 total
Normally this is 20ms or so on macos, and even 4-5ms on linuxOh, good to know!
That’s a bummer.
Well if 250ms is still acceptable and more important than size, than there's a trade-off
Yeah. Still might be worth it for some applications.
Ah, the article does cite a ~250ms slowdown, so that’s consistent with your experience.
For the record, how much size was saved here? Just curious.
about 70m -> 20m. same as zipped basically
I am new to GraalVM and I’m trying to get a native image built from a Clojure project (we have need for a CLI tool at my job and I would prefer to not have to introduce a new language just for it). I was able to install GraalVM (`graalvm-ce-java8-20.3.0`) including the native-image
utility. I was following https://www.astrecipes.net/blog/2018/07/20/cmd-line-apps-with-clojure-and-graalvm/ but ran into a road block. The native-image
utility runs successfully and produces an executable image. however, when I attempt to run the image, I get a stack dump indicating that the clojure.core
library is not found. I have found a few references to this in various places with various prescriptions for fixing it. None of them have worked for me. I’m using clojure 1.10.0
if that matters. Any assistance would be greatly appreciated. Thanks!
@mafcocinco I recommend following the hello world examples here: https://github.com/lread/clj-graal-docs
Also, for graalvm please use 1.10.2-alpha4, as suggested in the topic of this channel
thanks! such great information.
It's likely that your classpath for the graalvm project isn't set correctly.