-
Notifications
You must be signed in to change notification settings - Fork 3k
Avoid initializing Netty logger too early #45322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The supplier get can keep on creating new fast thread locals? I am a bit surprised we have a non static final fast thread local there tbh, regardless... eclipse-vertx/vert.x#5078 for more info |
Yes, as I did not want to change the existing behavior. FWIW, under normal circumstances we won't even need the FastThreadLocal (as its name implies) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Well, it can slow down the fallback path a little bit because
It's ok here. There's only one |
extensions/vertx/runtime/src/main/java/io/quarkus/vertx/runtime/VertxCurrentContextFactory.java
Outdated
Show resolved
Hide resolved
Status for workflow
|
When initializing
FastThreadLocal
eagerlyVertxCurrentContextFactory.VertxCurrentContext
we were inadvertently forcing the initialization of the logging infrastructure of Netty far too early.This can be seen in the following flamegraph (in purple on the right):
This change shouldn't have much of an impact on its own, but it's a good thing as it moves the initialization of the Netty logging out of the main thread