-
Notifications
You must be signed in to change notification settings - Fork 466
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
ContentTypeFactoryImpl Getting Config values cause unneeded load #21619
Comments
Hey team! Please add your planning poker estimate with ZenHub @dsilvam @victoralfaro-dotcms |
I was working on this PR: https://github.com/dotCMS/core/pull/19976/files |
@jdotcms @wezell it still has work to do but I think it is going to solve the Bug, right? |
PR #22143 |
new PR #22209 |
In our containerized world, we do not need to support on the fly configuration changes or configuration reloading any longer. Instead of relying on apache classes, file watchers, and other blocking patterns, we should just read in the configuration at startup as an immutable map and use it as needed.
For example, in the
ContentTypeFactoryImpl
we call this whenever the class is inited (which happens a lot as it is not a singleton).It turns out, our Config class is not really that performant. In this case, I see this a performance hotspot as java builds the exception's stack trace.
There are multiple places in our code where you can see performance issues with our use of the class.
org.apache.commons.configuration.AbstractConfiguration
If we ever need a mechanism to update config on the fly in the future, we can write something then to do so by replacing the map, etc.
The text was updated successfully, but these errors were encountered: