I had a chance to look a bit deeper at what causes clojure.test
to bloat GraalVM native-image RAM usage. It discovers what tests it will run at runtime using functions such as ns-interns
. When I brought an ns-interns
call into my hello world GraalVM app, it exhibited similar bloat and exe size to my hello world test GraalVM app. To avoid the bloat, I'm thinking a cljs test approach could work. If I understand, out of necessity, cljs builds up tests to run at compile time via macros.
By the way (might be old news to the more experienced, but), I find GraalVM's native-image
expert option -H:+PrintAnalysisCallTree
useful in figuring out what it being brought into a native image.
hmmm... maybe this more belongs in #graalvm ... will cross post.
@lee Oh that's interessting. I haven't used that option before. Maybe something for clj-graal-docs?
Yes, good idea. Maybe a troubleshooting section?
I was scanning through expert options from native-image --expert-options-all
and stumbled on it. (there are a lot of options!)
yeah, but I think the entire repo is about troubleshooting 🙂
true
just put it somewhere, can always be reorganized
also true :simple_smile: