johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [johnzon] rmannibucau commented on issue #40: JOHNZON-209 Fix JsonObject#toString() to escape key names.
Date Tue, 23 Apr 2019 04:55:15 GMT
rmannibucau commented on issue #40: JOHNZON-209 Fix JsonObject#toString() to escape key names.
URL: https://github.com/apache/johnzon/pull/40#issuecomment-485643290
 
 
   Hi @leadpony, it is required AFAIK. Did yiu try to move from String+charAt to toCharArray+[]
fir the iteration? Also preallocating the stringbuilder with the incoming string length can
help. Then we would need to be able to bypass the escaping when relevant but this requires
a cache and interning string or caching based on a hashcode will be likely costly as well
and will require eviction.
   To give an idea, if perfs are not impacted more than ~5% we are good IMHO, if they are
we can need a toggle to deactivate that fix. But first let's try to be a bit better before
adding conf ;).

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message