Fork me on GitHub
#graalvm
<
2020-09-27
>
dominicm21:09:48

Is there a trick for finding the cause of the size of a native image? I'm already at 50mb!

borkdude21:09:16

@dominicm Yes, check if there is any code using require, resolve or find-var, etc in non-top-level code (i.e. function bodies)

borkdude21:09:40

A good strategy for this, I find, is adding code to your binary in small increments and checking the size at every step. Often I just copy the code from libraries and comment out function bodies until I find the source of the bloat

borkdude21:09:28

You can also maybe use this: https://github.com/lread/clj-graal-docs#report-what-is-being-analyzed I haven't used it as much, but the output may be useful