Fork me on GitHub
#rewrite-clj
<
2019-11-20
>
lread21:11:54

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.

lread21:11:16

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.

lread21:11:16

hmmm... maybe this more belongs in #graalvm ... will cross post.

borkdude21:11:41

@lee Oh that's interessting. I haven't used that option before. Maybe something for clj-graal-docs?

lread21:11:36

Yes, good idea. Maybe a troubleshooting section?

lread21:11:35

I was scanning through expert options from native-image --expert-options-all and stumbled on it. (there are a lot of options!)

borkdude21:11:46

yeah, but I think the entire repo is about troubleshooting 🙂

borkdude21:11:12

just put it somewhere, can always be reorganized

lread21:11:47

also true simple_smile