thanks y'all
So, after a lot of debugging I started to wonder if babashka is really being compiled with those flags, I added this to babashka main first line:
(println (System/getProperty "borkdude.dynaload.aot"))
(println (System/getProperty "clojure.compiler.direct-linking"))
(println (System/getProperty "clojure.spec.skip-macros"))
Then I run:
script/uberjar
script/compile
and when running ./bb
I get:I'm probably missing something during the build, but could not figure it out 😔
These properties are not part of the runtime, only during build
So you should put them on the top level and watch if they are printed during compilation
Of both Clojure and GraalVM
Oh, now it makes sense!
About the UPX, the size of clojure-lsp was reduced from 107MB -> 29MB with a drawback of 300ms on the startup
1👍I'll do some tests but the trade-off for clojure-lsp looks good
1🎉Probably will use this action on the CI: https://github.com/svenstaro/upx-action
Does it work on all platforms?
the action say it does, I'll test if it works nice with graalvm compiled binaries yet
So, the clojure.compiler.direct-linking
was correctly configured, it was just missing the dynaload config that i"ll add now 🙂
🎉
It indeed reduced from 117MB -> 109MB 🙂
it's something indeed, with UPX this should be < 29MB
thanks for the help @borkdude
:)