You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've noticed when we are calling to Config.getDuration() often enough, it generates a lot of garbage. Allocation profiling shows the following picture:
We've noticed when we are calling to Config.getDuration() often enough, it generates a lot of garbage. Allocation profiling shows the following picture:
Also
Basically,
SimpleConfig.getDuration()
usesString.matches()
API (https://github.com/lightbend/config/blob/main/config/src/main/java/com/typesafe/config/impl/SimpleConfig.java#L781), which, internally, creates a newPattern
object just to throw it away.A simple fix is to hoist
Pattern
object as a static field and use it to perform the matching.The text was updated successfully, but these errors were encountered: