rewrite-clj

https://github.com/clj-commons/rewrite-clj
lread 2019-11-20T21:32:54.314Z

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.

lread 2019-11-20T21:35:16.315900Z

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.

lread 2019-11-20T21:37:16.316500Z

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

borkdude 2019-11-20T21:42:41.317Z

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

lread 2019-11-20T21:45:36.317800Z

Yes, good idea. Maybe a troubleshooting section?

lread 2019-11-20T21:46:35.318900Z

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

borkdude 2019-11-20T21:46:46.319100Z

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

lread 2019-11-20T21:46:52.319300Z

true

borkdude 2019-11-20T21:47:12.319900Z

just put it somewhere, can always be reorganized

lread 2019-11-20T21:47:47.320100Z

also true :simple_smile: