Does it worth to use GraalVM and increase complexity to reduce runtime from 2 seconds? Will this make it something around 0,5 second or lower? Do you have example of Docerfile to share? I already have Dockerfile to build uberjar. I see there are many flags to set witn GraalVM in articles. Just not sure if it is worth to invest my time into it or not. runtime will decrease API response time, because I use Google Cloud Run (instance run on demand of request and is removed after response). Any reasons to use other docker image, than official oracle graalvm?
thank you. Can you share examples of issues about ” some dependencies might take considerable effort”?
I don't know all of the pitfalls, but a program that has heavy reliance on jni, reflection, or eval seems like it would be difficult to compile with graalvm
it can depend a lot on your dependencies. some dependencies will compile under graalvm without any issue. some dependencies might take considerable effort. what kind of things will your program be doing? you should definitely experience startup times (and probably runtimes) under 0.5 seconds. how much saving seconds off your startup time will depend on the use case. for cli and scripting programs, it's a huge win. I don't use docker, so unfortunately, I have no advice there. I think graalvm is really cool and I think the payoff over the next decade could be high, but it's unclear how much that is just personal excitement.
as long as your dependencies are already graalvm compatible, then the process of getting started using the info in the links in this channel topic are fairly painless, straightforward, and quick