Live data from Hacker News

GraalVM for JDK 21

medium.com

51–60 of 80 posts

Re: GraalVM for JDK 21

#52
post #34

I've only done one project with GraalVM and I've been pretty happy with it in regards to faster startup time. I was doing stuff in Clojure. Clojure is a great language but it tends to have very slow startup times, even by JVM standards (it's not weird for a large Clojure program to take 5-6 seconds to start. Even a "hello world" can take upwards of a second or two). Graal mostly Just Worked with the standalone uberja…

What are the applications where slow startup time is such a big issue?

Re: GraalVM for JDK 21

#53

Earlier quoted context omitted.

It's fascinating technology, but in my opinion too little, too late. Compiling with GraalVM is still a pain and will not work out-of-the-box without modifications for any non-trivial project. This is mostly, I believe, not GraalVM's fault, because it can only do so much within the confines of the existing ecosystem. If only AoT compilation to native code would have been taken seriously from the start, if only gcj wou…

gcj had a lot of problems beyond needing configuration of reflection metadata. It used a full reimplementation of the standard library, and it was never adopted by the wider Java community being largely just Red Hat's strategy for creating a fully open source Java implementation rather than something offering specific benefits to Java developers. In particular people thought it'd lead to faster code, but GCC was neve…

> With this new release the compiled images can not only be faster than JIT compiled Java (wow) but also use way less memory

Source ?

Re: GraalVM for JDK 21

#54
post #34

I've only done one project with GraalVM and I've been pretty happy with it in regards to faster startup time. I was doing stuff in Clojure. Clojure is a great language but it tends to have very slow startup times, even by JVM standards (it's not weird for a large Clojure program to take 5-6 seconds to start. Even a "hello world" can take upwards of a second or two). Graal mostly Just Worked with the standalone uberja…

What are the applications where slow startup time is such a big issue?

Commandline tools?

Re: GraalVM for JDK 21

#55
post #34

I've only done one project with GraalVM and I've been pretty happy with it in regards to faster startup time. I was doing stuff in Clojure. Clojure is a great language but it tends to have very slow startup times, even by JVM standards (it's not weird for a large Clojure program to take 5-6 seconds to start. Even a "hello world" can take upwards of a second or two). Graal mostly Just Worked with the standalone uberja…

What are the applications where slow startup time is such a big issue?

Serverless apps possibly.

Re: GraalVM for JDK 21

#56

Earlier quoted context omitted.

gcj had a lot of problems beyond needing configuration of reflection metadata. It used a full reimplementation of the standard library, and it was never adopted by the wider Java community being largely just Red Hat's strategy for creating a fully open source Java implementation rather than something offering specific benefits to Java developers. In particular people thought it'd lead to faster code, but GCC was neve…

>With this new release the compiled images can not only be faster than JIT compiled Java (wow) but also use way less memory and start instantly Does this mean that once Project Valhalla lands, Java via Graal will be a viable competitor to C++ for tasks requiring extremely high performance?

Possible, but i don't think it's very likely. Project Valhalla is a big umbrella term but couple of important points :

- The new value type don't garanty flat memory representation, so might have some corner cases which are not properly optimized

- The monomorphization or java vs C++ is still a big advantage for c++

- The compiler optimization of LLVM/GCC are still quite a bit better (in term of generated code) vs jvm/graal

Re: GraalVM for JDK 21

#59
post #17

We tried to use it to improve AWS lambda startup times but desisted as it was a pain to use it with an existing app. It required too many tweaks as there are waay too many things that rely on reflection :( Things that broke include: JSON (de)serialization using Jackson, validations using hibernate, validator, AWS SDK, and even simpler libs like picocli... It could be quite useful for a set of simpler apps though

ye even less relevant for that usecase with snapstart.

SnapStart for Java 17 was only released very recently, so if you are a bit early in the cycle it doesn't help. Don't even want to guess when it will be available for Java 21.

Re: GraalVM for JDK 21

#60
post #57

Warning: Graal is owned by a law-firm called Oracle (that happens to employ some programmers too).

Who is actually at risk of falling victim to Oracle's infamous licensing shakedowns, though? And how bad are they actually?
Post reply on HN