Build ran forever. Went and looked, and discovered that a program called ecj1
had taken up well over 3 hours of CPU time. I announced that it was probably Java-related based on that alone.
Yup.
This amuses me.
(Note: I killed the process. The build completed without a single diagnostic or error. This makes even LESS sense.)
Comments [archived]
From: Dave Leppik
Date: 2012-07-17 13:07:00 -0500
Having been developing in Java full time for the last decade, I think you’re stuck in the 1990s. As is ecj1, which is part of GCJ, where their latest news is dated 2009. (Okay, that’s not the 90s, but GCJ stopped being relevant around the year 2000.) GCJ never made it beyond beta quality, partly because their model (compile Java byte code at build time) lost out to JITs, for numerous good technical reasons.
If you want a nice open source Java source-to-bytecode compiler, you’ve got two choices: OpenJDK from Oracle (GPL 3), or Eclipse JDT (Apache license). The latter is arguably better, being just as capable but designed for annotating source code in an IDE as you type.
There are plenty of arguments against Java, but the build tools sure aren’t one of them. Unless you’re stuck on GCJ. In which case the only fair comparison against C would be Microsoft Visual C++ 1.0.
From: seebs
Date: 2012-07-17 19:28:06 -0500
I was under the impression that compile byte code at build time and JITs were not mutually-exclusive; that you’d still compile to byte code, but that the byte code would then be converted to native code by JITs. (Which is, it is perhaps worth noting, also what at least one Lua interpreter now does.)
And yes, modern Java is a lot more efficient than people usually give it credit for — look at Minecraft, which is really a pretty spectacular amount of processing for something that runs fast enough to make a smooth video game.