Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to and GraalVM slack:
borkdude 2021-06-30T22:38:02.245100Z

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.

alexmiller 2021-06-30T22:38:35.245300Z

yeah, that works, I've done that

borkdude 2021-06-30T22:39:11.246Z

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

alexmiller 2021-06-30T22:39:30.246200Z


alexmiller 2021-06-30T22:39:34.246400Z

not on this machine

borkdude 2021-06-30T22:40:44.247Z

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

alexmiller 2021-06-30T22:41:51.247600Z

I'll look on my last machine but it might have been two machines ago in which case its in backups or somewhere

borkdude 2021-06-30T22:42:18.247800Z


alexmiller 2021-06-30T22:42:52.248300Z

I don't think it was that hard. basically make the method you want to call and emit a call to invoke it :)

alexmiller 2021-06-30T23:11:03.250200Z

was easier to recreate it than to find the patch, something like this