5 ms·
I don't really understand all the complaining about JVM startup times. It's a second; usually less. Unless you're using JVM apps as command line utilities I don
by tormeh 12y ago
I don't really understand all the complaining about JVM startup times. It's a second; usually less. Unless you're using JVM apps as command line utilities I don't see the problem.
- kjjw 12y agoI think the mention of JVM start up time is a bit erroneous. A mechanism for uninterrupted service during deployments is needed whether the JVM takes a millisecond, a second or a minute to load up. The article is interesting though.
- loevborg 12y agoA "hello world" Java program starts up fast, sure. But Clojure start-up time usually takes more than 1 second; it can be 10 seconds plus if you include many jars. I don't know whether that's more the fault of Clojure or the JVM.
- saosebastiao 12y agoIt is clojure. Clojure literally bootstraps itself on every startup, and this bootstrap takes a little less than a second even on a fully started jvm. And since none of your clojure code can run until clojure.jar is fully bootstrapped, large clojure projects can easily start up for 5+ seconds before executing a single piece of code. I love clojure as a language, but my code is usually cli oriented and it was such a terrible fit for it that I switched to Scala. Despite being on the jvm, my startup times are an order of magnitude better.
- jamii 12y agoFwiw, clojurescript and nodejs starts up pretty fast. The tooling isn't quite as good as clojure yet, but it doesn't take much to out-repl scala.
- exelib 12y agoJVM starts in less than second also for a little bit more as "hello world" java program. But different crappy path/annotations scanning and bytecode manipulating tools like hibernate take a long time.
- mateuszf 12y agoI don't remember the exact spot, but I think that this video: https://www.youtube.com/watch?v=8NUI07y1SlQ https://www.youtube.com/watch?v=8NUI07y1SlQ has explanation for why loading clojure programs takes so long.
- adambard 12y agoI have several apps that use Enlive for templating. It's an awesome library, but reading HTML, parsing it out, and producing the templates at compile-time seems to add a very notable chunk to the startup. Better at compile-time than runtime, of course, but definitely something to consider.
- nordsieck 12y agoI believe a substantial portion of Clojure's startup time is just reading all of the meta data into memory.
- cliftonk 12y agoBut the site is still down for some period of time, even if it's less than a second. That's unacceptable for applications with many users that are deployed many times per day.