quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.81k stars 2.69k forks source link

JDK 24 new console is causing a serious regression in startup #44471

Open geoand opened 21 hours ago

geoand commented 21 hours ago

Description

When using the rest-json quickstart, on my machine I see the following numbers for startup:

The regressions from 23 to 24 can be reversed by setting -Djdk.console=java.base. We should do that as the first thing in our generated main (unless the user has already set such a property).

P.S. @dmlloyd spotted the JLine issue by looking at the allocation flamegraphs I produced:

21: Image

24: Image

Implementation ideas

No response

geoand commented 21 hours ago

@dmlloyd also proposed:

we might be able to modify logmanager to automatically set the property before initializing the console

which also makes sense

dmlloyd commented 20 hours ago

I've opened https://issues.redhat.com/browse/LOGMGR-354 with this idea.

geoand commented 20 hours ago

🙏

geoand commented 5 hours ago

It turns out that using -Djdk.console=java.base gets us back to JDK 21 levels of startup time when using JDK 23, so we probably want to incorporate it sooner rather than later @dmlloyd.

Here is an allocation framegraph for JDK 23:

Image

gsmet commented 2 hours ago

Is this with dev mode or plain startup?

I have a vague recollection @Karm opened an issue to determine if the new console could allow us to get rid of Jansi and friends.

geoand commented 2 hours ago

Is this with dev mode or plain startup?

All the flamegraphs are from prod mode startup