nfsantos opened a new pull request, #1616: URL: https://github.com/apache/jackrabbit-oak/pull/1616
Cache in a HashMap in the heap interned to avoid calling `String.intern()` for every String that should be interned. Calls to `String.intern()` are much more expensive than calls to `HashMap.get()`. In a test reading 10 million paths from a file and calling `SortKey.genSortKeyPathElements(path)` for each of them, the times are the following: - calling String.intern for every String: 25 seconds - caching interned Strings in a map (this PR): 19 seconds -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
