GraalVM release stream is now live on youtube. Seems like I have to update all my CI stuff to use new urls and paths: https://www.oracle.com/java/technologies/jdk-script-friendly-urls/
A bit late, just started watching, is new Oracle GraalVM OSS friendly or do we stick with the GraalVM Community Edition?
I think it is, not sure
I think I'll stay with the community edition since I get a smaller binary and lower compile time
Hmmm... interesting!
And I guess some licence-smart folks will opine eventually on the practical differences between these two licence-wise.
Got my question answered. With the -Ob flag you will get smaller binaries (bb shrinks to 65mb now) but less optimizations as well
the -Ob flag is much closer to what CE was like
but without it you just get better performance
I guess I should do a poll then or run some benchmarks ;)
I guess I could just time how long the lib tests take (although there are some random generator stuff in there which may mess with the timings and http requests etc)
There's also O1, O2, etc
Just tested with 01: 63mb, 1M loop in 550ms (with -Ob I got 600ms)
This seems to be the sweet spot
https://github.com/babashka/babashka/issues/1577 also cc @ericdallo, just FYI
Quite interesting!
Probably performance is more important for clojure-lsp if we change that
I'm getting a 20mb binary size increase with GraalVM 20 😫
10mb less
Still a net increase 🤔
No, compared to the previous version
Oh, dang!
https://graalvm.slack.com/archives/CN9KSFB40/p1686676579411699
Answer: use -Ob for smaller binary size (but less performance)
How much of a size decrease are you seeing with -Ob?
it's evolving 🙂
are the compile times still the same as a few years ago?
probably better
especially with -Ob
I'm having a bit of trouble figuring out the best pattern for freeing memory allocated in a shared library built with graal and returned to a C caller. For instance, if you return the value of a CCharPointerHolder, as is done here: https://github.com/babashka/sci/blob/master/doc/libsci.md, would you have to hang onto the CCharPointerHolder and do some bookkeeping to associate it with the pointer, so the caller could ask for close to be called on it?
Probably best to ask in the graalvm community slack, native-image channel
I think they have an API where you can "pin" the pointer so it doesn't get GC-ed
https://www.graalvm.org/sdk/javadoc/org/graalvm/nativeimage/PinnedObject.html
OK, thank you very much! I think the CCharPointerHolder result does get pinned, from looking at the docs. I just don't see a straightforward way to free it once I'm done with it in C. I will ask in the Graal slack. Thanks again!
What are you creating, if you want to share?
I am writing a plugin for the Unreal Engine that's related to character animation.
cool