leadpony edited a comment on issue #40: JOHNZON-209 Fix JsonObject#toString() to escape key names. URL: https://github.com/apache/johnzon/pull/40#issuecomment-485559407 Hello @rmannibucau You are right. My first commit was too naive. I wrote [a small benchmarking program](https://github.com/leadpony/jsonp-benchmark) and measured the throughput of `JsonObject.toString()` using [Java Microbenchmark Harness](https://openjdk.java.net/projects/code-tools/jmh/) after I made the fix less impacting to the performance. The result are: #### Johnzon 1.1.11 (current stable) ``` Benchmark (name) Mode Cnt Score Error Units JsonpBenchmark.jsonValueToString glossary.json thrpt 25 416666.246 ± 1022.390 ops/s ``` #### Johnzon 1.1.12-SNAPSHOT (including the commit 542765dd97f02910bb78d745632aef3fd9dd5582) ``` Benchmark (name) Mode Cnt Score Error Units JsonpBenchmark.jsonValueToString glossary.json thrpt 25 394121.959 ± 1196.864 ops/s ``` Please note that I deleted the code escaping some range of code points: '\u0080'-'\u00a0' and '\u2000'-'\u2100'. Is this handling really required? Thank you.
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services