Re:Go 1.6 is Released
by mahmoudimus on Thursday February 18, 2016 @01:42AM
(#11124097)
Startup times are largely going to be a thing of the past in Java9. Improved code cache, out of the box optional AOT compilation, and the modularization work is going to be great.
I am running several (albeit Kotlin) daemons right now that are using less than 256MB of ram on my machine. Everything on the JVM is configurable.
At some point, I think it's just simply a matter of taste. If you want to be closer to the metal, then Java (and I'd even argue Go) isn't really the right language for that.
What's your use cases where you've found startup time to be a significant issue?
Re:Go 1.6 is Released
by lobster_johnson on Wednesday February 17, 2016 @06:15PM
(#11122346)
Command-line programs.
Short-lived processes are an issue, because while startup time can be ok, code won't perform well until it's hot enough to be JITed.
You can set the JIT threshold to 0, assuming the impact would still be worthwhile.
The alternative is a commercial JDK, almost all of them do support AOT compilation.
Re:Go 1.6 is Released
by kasey_junk on Wednesday February 17, 2016 @06:24PM
(#11122401)
Long running processes without a lot of events can also deal with "startup issues", in that they won't trigger JIT.
You can set the JIT threshold to 0, then it will JIT the full bytecode on startup, but it might perform worse.
JVM suffers from slow startup times and tends to eat a lot of RAM, even when the app doesn't technically need it around. It has an object model that spawns a bazillion tiny objects, and much of the JVM's GC design exists to cancel out those tiny object allocations.
JVM has many upsides (the portability and pluggable nature of JAR files is a huge one), but I think a lot of people are attracted to Go's bare-bones approach. Closer to the metal, a "better C", smaller overhead.