Fork me on GitHub
#graalvm
<
2022-08-26
>
Adam Helins10:08:46

I'm surprised to notice that I can compile a native image of an uberjar without direct linking and the binary seems to behave just fine. How is that possible? Wasn't direct linking mandatory? (using 22.2.0)

borkdude10:08:55

direct linking isn't mandatory but in some cases it can result in smaller binaries as the graal analyzer may notice some stuff can be left out

💯 1
Adam Helins10:08:29

Do you reckon it is worth the effort perf-wise manually initializing more Java stuff at build time? Alongside the CLJ stuff detected by graal-build-time

borkdude10:08:47

It's not recommended to initialize anything at build time but for Clojure stuff we have to. For most Java stuff it probably doesn't get you anymore than a few ms of startup time

Adam Helins08:08:32

Indeed I tried quite a few things yesterday, initializing some stuff at build time, eliding metadata from uberjars, ... It made virtually no difference at all on performance and image size