You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Joel Richard (JIRA)" <ji...@apache.org> on 2015/10/22 10:58:27 UTC

[jira] [Commented] (SLING-5184) JSONRenderer.quote should not use synchronized StringWriter with unspecified length

    [ https://issues.apache.org/jira/browse/SLING-5184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14968830#comment-14968830 ] 

Joel Richard commented on SLING-5184:
-------------------------------------

Pull request: https://github.com/apache/sling/pull/108
[~rombert], could you please have a look at it?

> JSONRenderer.quote should not use synchronized StringWriter with unspecified length
> -----------------------------------------------------------------------------------
>
>                 Key: SLING-5184
>                 URL: https://issues.apache.org/jira/browse/SLING-5184
>             Project: Sling
>          Issue Type: Improvement
>          Components: Commons
>    Affects Versions: Commons JSON 2.0.12
>            Reporter: Joel Richard
>            Priority: Minor
>              Labels: json, performance
>
> StringWriter uses a StringBuffer internally which is synchronized. By using a StringBuilder instead and initializing it with the estimated size, this methods becomes 5 times faster (in my real test case).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)