This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-25
Channels
Would it be possible to precompile malli or something?
(time (require 'malli.dev))
"Elapsed time: 2972.572124 msecs"
It’s quite an expensive thing to load it.it's not about criterium or some benchmarks test as I understand it. Probably a local problem?
Yeah I’m assuming precompiling a dev namespace removes advantage of late binding while using the repl. If used in production would be compiled anyway.
I've been asking robust tools for AOTing libraries for years. There are ways to do this, but I have not found anything that is robust: • https://clojure.org/guides/dev_startup_time • https://clojureverse.org/t/deploying-aot-compiled-libraries/2545 Please share if you find a way to precompile malli that just works
spec is precompiled by the core team, so:
user=> (time (require '[clojure.spec.alpha]))
"Elapsed time: 0.202042 msecs"
I don’t know what to tell you, takes almost 3 seconds on my Macbook pro 2019. Between Malli, tick with another 1.6sec load, clojure data xml with another 1.5sec load, it takes 10 sec to just load dependencies for my very simple command line utility.
It’s a real bummer