rzo1 commented on PR #568: URL: https://github.com/apache/opennlp/pull/568#issuecomment-1857359451
@kinow thanks for the details and the flight recording :-) I think, that the current use of String interning was an attempt to optimize string comparisons by using the string constant pool (until it explodes). I guess, that the idea was also to save memory. There is a really nice blog article which summarizes the pros/cons: https://www.codecentric.de/wissens-hub/blog/save-memory-by-using-string-intern-in-java The state, that > Only use String.intern() on Strings you know are occurring multiple times, and only do it to save memory I think, that we can remove a lot of the current object creation related to the use of `StringList`, `StringListWrapper` or the creation of `StringList` objects just for the sake of running a `contains(...)`, which should make up for the overhead due to the removal of String interning. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@opennlp.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org