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

Missing String.intern() usage #74

Open
fbacchella opened this issue Nov 10, 2017 · 0 comments
Open

Missing String.intern() usage #74

fbacchella opened this issue Nov 10, 2017 · 0 comments

Comments

@fbacchella
Copy link
Contributor

My code needs many instance of grok, each with a slightly different configuration. But each grok instance keep pattern string in memory, so there is many instance of them. In my case, there is about 200 instances of grok, so each pattern is present 200 times in memory, that's a lot.

Using String.intern() will help reduce memory footprint:
https://dzone.com/articles/string-interning-what-why-and
http://java-performance.info/string-intern-in-java-6-7-8/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant