I'm eventually getting round to trying to see if I can convert a very small application to run natively. However, I'm observing a huge amount of time to produce and the native image compliation fails with
java.lang.OutOfMemoryError: GC overhead limit exceeded
Giving the native image maker more gigs...
that helped 🙂
I recently encountered those issues as well. Have you seen this repo? There are a bunch of useful tips: https://github.com/lread/clj-graal-docs
Check out the tip on direct linking
And also see if there’s anything you can prune from your dependency tree. I removed core.async and its deps and my compile times (and the ram required) dropped substantially.
hmm babashka does include core.async but I never noticed a problem with that1
Yes, I'm using the clj-graal-docs as a reference
Unfortunately, I've had t ostop, as I'm getting far too many problems with messages such as these
io.netty.buffer.AbstractByteBufAllocator the class was requested to be initialized at run time (from the command line). io.netty.buffer.AbstractByteBufAllocator has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked. Try avoiding to initialize the class that caused initialization of io.netty.buffer.AbstractByteBufAllocator
(due to 3rd party library dependencies)