[
https://issues.apache.org/jira/browse/OAK-445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496313#comment-13496313
]
Thomas Mueller commented on OAK-445:
------------------------------------
I have implemented a simple string cache for this, I will dig up where the
latest code is (probably in an old microkernel project).
> Allow JSON strings to be reclaimed after they've been parsed
> ------------------------------------------------------------
>
> Key: OAK-445
> URL: https://issues.apache.org/jira/browse/OAK-445
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
>
> Currently the JsopTokenizer uses String.substring() when returning various
> tokens. This can be a bit troublesome as the returned String instances often
> keep a reference to the full underlying JSON string, which prevents that one
> from being reclaimed.
> It would also be nice if the tokenizer automatically detected common tokens
> like "jcr:primaryType" or "nt:unstructured" and use flyweight instances to
> avoid too many duplicate copies of such strings.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira