4 ms·
The startup time of the jvm is negligible. This myth keeps coming up. Most of the startup time is Clojure itself.
by invisiblerobot 6y ago
The startup time of the jvm is negligible. This myth keeps coming up. Most of the startup time is Clojure itself.
- outworlder 6y agoThis high startup time in Clojure is a side-effect of the JVM. If you have a hello world program that does nothing it is indeed fast. If you are running Clojure you need to run at least clojure.core. Loading that is handled - surprise - by the JVM. As would be expected, if you run other implementations (like Dalvik), this can change dramatically (for worse, usually). So it is correct that loading the JVM itself is not what's taking most of the time. But loading take so much time because of the JVM. https://blog.ndk.io/clojure-bootstrapping.html https://blog.ndk.io/clojure-bootstrapping.html
- lilactown 6y agoWhenever "Clojure startup time" comes up, people are quick to point to one thing: either it's the JVM "bloat," or that it's nothing to do with the JVM and is actually all Clojure. Here's a pretty good (if a bit outdated) analysis on Clojure startup time: http://clojure-goes-fast.com/blog/clojures-slow-start/ http://clojure-goes-fast.com/blog/clojures-slow-start/ The question is, could Clojure be rewritten in a way that loads significantly faster with the same behavior on the JVM? I'm not sure. And especially on big projects, the lack of DCE on the JVM can lead to loading a ton of useless code that significantly impacts startup time outside of the Clojure language.