4 ms·
Java's start up time makes it pretty crappy for command line utilities.
by iolsantr 12y ago
Java's start up time makes it pretty crappy for command line utilities.
- mike_hearn 12y agoWhen 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 12y agoIt 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.
- peterashford 12y agoThe class of tasks for which Java's startup time is an issue is very very small. I wouldn't use it for a device driver because of resource issues but there aren't many command line commands where 0.08s is an issue.
- wtbob 12y agoLuaJ is an order of magnitude slower to startup than Lua, IIRC. Could be LuaJ's fault, not Java's, of course.
- twic 12y agoJava's start-up time is on the order of tens of milliseconds: http://nicholaskariniemi.github.io/2014/02/11/jvm-slow-startup.html 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.
- peterashford 12y agoStartup time on my Win7 box: 0.08 sec.