deercreeklabs / lancaster

Apache Avro library for Clojure and ClojureScript
Other
60 stars 5 forks source link

GraalVM compatibility: using multi-segment namespaces of primitive-math #22

Closed bartkl closed 2 years ago

bartkl commented 2 years ago

Hey Chad,

We are using Lancaster as a CLI application, but the official JVM is terribly slow when it comes to start-up time. Therefeore we'd like to compile a native image using GraalVM, which boots hundreds times faster.

Lancaster causes an issue in the compilation process though. It uses a single-segment namespace from the primitive-math library (which I'm told is only there for backward compatibility), which doesn't fare well with GraalVM. Lucky enough, the 1.0.0 version of the library being used includes a multi-segment version as well. All that is needed to switch is to change the references, as I've done in this commit.

As far as I know, single-segment namespaces are bad practice anyways, so there's only gain here I think? Let me know what you think :).

Bart