How can I measure how much time is spent in static initializers when requiring a namespace in Clojure? Maybe by patching the Compiler where it emits the __init.class
classes? The reason I'm asking this is that I have been corresponding with a GraalVM dev who is adamant to move as much static initialisation to runtime as possible, but I suspect this will be a pretty big startup time penalty for Clojure projects, which kind of defeats the purpose of native images if this turns out to be significant.
yeah, that works, I've done that
do you perhaps have a branch or patch which shows how to do it? I can probably figure it out, but if you still have such a thing around, then I'd be happy to re-use it
hmmmmmmmmm
not on this machine
I will go to sleep now, since it's getting late, but if you or anyone else has something useful, I'll take a look later. Thanks
I'll look on my last machine but it might have been two machines ago in which case its in backups or somewhere
🤞
I don't think it was that hard. basically make the method you want to call and emit a call to invoke it :)
was easier to recreate it than to find the patch, something like this