top | item 8678298

(no title)

iolsantr | 11 years ago

Java's start up time makes it pretty crappy for command line utilities.

discuss

order

twic|11 years ago

Java's start-up time is on the order of tens of milliseconds:

http://nicholaskariniemi.github.io/2014/02/11/jvm-slow-start...

The 'Hello' program there takes a little over 100 ms for me. I guess my computer is even less of a powerhouse than the author's.

FWIW, the Python equivalent takes about 30 ms on my machine. So, you pay maybe 70 ms to use Java. I don't think many users will notice an extra 70 ms on their command line.

Java's notoriously slow startup is really about the slow startup of software written in Java. Application servers are probably the worse offenders - how can it take a minute and a half to start a fancy webserver? What's it doing in there? They've got a lot better, though; the current generation of app servers start in one or two seconds. Not that anyone cool uses app servers any more anyway. Big bloated GUI apps also deserve some shame here (although i will forgive Eclipse, because i like my IDEs with some meat on them). Language platforms like Clojure and Groovy also manage to take their time, but then they're doing some pretty amazing stuff, i suppose.

mike_hearn|11 years ago

When did you last try it? Startup time was optimised heavily some time ago and nowadays I don't notice any real difference unless I wrote some toy app and used "time". The JVM starts fast enough that you can write command line utilities just fine.

saosebastiao|11 years ago

It is certainly substantially better than it used to be, but it is still pretty far away from an AOT compiled native executable. And forget it entirely if you are running Clojure or Groovy code.

wtbob|11 years ago

LuaJ is an order of magnitude slower to startup than Lua, IIRC. Could be LuaJ's fault, not Java's, of course.

peterashford|11 years ago

Startup time on my Win7 box: 0.08 sec.