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
Is your feature request related to a problem? Please describe.
When creating the JvmStackFrames the daemon instantiates a new String for each method in the stacktrace.
This causes duplicates, since there could be other stacktraces with similar methods, and the likely hood of identical stacktraces between 2 harvest cycles is high.
Feature Description
To prevent duplicate Strings from being created, a cache is used.
The cache is keyed by the 3 components of the method information (class, name, signature). Each entry should expire after so many harvest cycles, to prevent memory leaking.
Additional context
Number of harvest cycles for cache expiration needs to be determined thru experimentation.
The same idea can be employed for the ThreadNameNormalizer, though the cache in this case can probably last longer.
Priority
Nice to Have
The text was updated successfully, but these errors were encountered:
kford-newrelic
changed the title
Prevent String duplication
JFR Optimization - Prevent String duplication
Aug 24, 2021
Is your feature request related to a problem? Please describe.
When creating the JvmStackFrames the daemon instantiates a new String for each method in the stacktrace.
This causes duplicates, since there could be other stacktraces with similar methods, and the likely hood of identical stacktraces between 2 harvest cycles is high.
Feature Description
To prevent duplicate Strings from being created, a cache is used.
The cache is keyed by the 3 components of the method information (class, name, signature). Each entry should expire after so many harvest cycles, to prevent memory leaking.
Additional context
Number of harvest cycles for cache expiration needs to be determined thru experimentation.
The same idea can be employed for the ThreadNameNormalizer, though the cache in this case can probably last longer.
Priority
Nice to Have
The text was updated successfully, but these errors were encountered: