Skip to content
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

JFR Optimization - Prevent String duplication #206

Open
meiao opened this issue Aug 23, 2021 · 0 comments
Open

JFR Optimization - Prevent String duplication #206

meiao opened this issue Aug 23, 2021 · 0 comments
Labels
estimate Issue needing estimation

Comments

@meiao
Copy link
Contributor

meiao commented Aug 23, 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

@kford-newrelic kford-newrelic changed the title Prevent String duplication JFR Optimization - Prevent String duplication Aug 24, 2021
@kford-newrelic kford-newrelic added the oct-dec qtr Represents proposed work item for the Oct-Dec quarter label Aug 24, 2021
@kford-newrelic kford-newrelic removed the oct-dec qtr Represents proposed work item for the Oct-Dec quarter label Jan 13, 2022
@jasonjkeller jasonjkeller added the Q4 SC Represents proposed sustainability targets for FY Q4 label Jan 28, 2022
@kford-newrelic kford-newrelic removed the Q4 SC Represents proposed sustainability targets for FY Q4 label Feb 1, 2022
@kford-newrelic kford-newrelic added oct-dec qtr Represents proposed work item for the Oct-Dec quarter and removed oct-dec qtr Represents proposed work item for the Oct-Dec quarter labels Sep 8, 2022
@kford-newrelic kford-newrelic changed the title JFR Optimization - Prevent String duplication JFR Optimization - Prevent String Duplication Feb 6, 2024
@newrelic newrelic deleted a comment from workato-integration bot Feb 6, 2024
@kford-newrelic kford-newrelic changed the title JFR Optimization - Prevent String Duplication JFR Optimization - Prevent String duplication Feb 6, 2024
@kford-newrelic kford-newrelic added the estimate Issue needing estimation label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate Issue needing estimation
Projects
None yet
Development

No branches or pull requests

3 participants