4 ms·
One thing I've noticed is that the JVM startup time is actually pretty small. What's slow is waiting for Clojure to bootstrap itself.
by wtetzner 13y ago
One thing I've noticed is that the JVM startup time is actually pretty small. What's slow is waiting for Clojure to bootstrap itself.
- pron 13y agoYep. A JVM doesn't take more than a about 100ms to start up. But Clojure takes a long time, and Leiningen is slow as hell.
- jhh 13y agoThat's true, but it's generally like this with any Java application. The JVM starts in 0.3 seconds, but loading all your classes usually takes seconds. I don't know the arcitecture well enough, but I think it's because it looks for classes in a lot of places and unpacks JAR files etc.
- strictfp 13y agoThat of course depends on the number of deps that you have, but you have to have a _lot_ to reach into the second range.
- rossjudson 13y agoDetailed discussion on startup times at http://nicholaskariniemi.github.io/2014/02/11/jvm-slow-startup.html http://nicholaskariniemi.github.io/2014/02/11/jvm-slow-start... (and subsequent articles by the same author).
- mduerksen 13y agoJVM Feature Request: The ability to preserve a complete JVM state (in this case with loaded Clojure stuff) and quickly start from there. Does anybody know if something like that is possible/already exists?
- wink 13y agohttps://github.com/ninjudd/drip https://github.com/ninjudd/drip http://www.martiansoftware.com/nailgun/ http://www.martiansoftware.com/nailgun/ http://leiningen.org/grench.html http://leiningen.org/grench.html All 3 not perfect, but have a look :)
- 616c 13y agoNot quite what you asked, but I found people recommending this. https://github.com/ninjudd/drip https://github.com/ninjudd/drip
- pjmlp 13y ago> Does anybody know if something like that is possible/already exists? The majority of commercial JVMs that tend to be ignored on HN, provide JIT cache between runs and AOT compilation.
- ivank 13y agoI have used http://criu.org/ http://criu.org/ on Ubuntu 14.04 to checkpoint and restore a Java process running a Clojure nREPL server. It took 480 ms to checkpoint a 128MB process and 213 ms to restore on a 2.4ghz E5645.