carterkozak opened a new pull request #444:
URL: https://github.com/apache/logging-log4j2/pull/444


   09e1bae: Avoids allocating new string objects when parameters are formatted, 
preferring to use the existing StringBuilder instance.
   
   38b9650: Remove JsonWriter.formattableBuffer in favor of using the existing 
JsonWriter.stringBuilder field.
   
   from the commit message:
   ```    
       JsonWriter avoids an additional StringBuilder for formatting in
       favor of escaping in places.
       It's worth some benchmarks to compare and contrast. In the ideal
       case, strings don't contain characters that must be escaped, and no
       memory copying is necessary. When escaping does occur, contents are
       localized to an array and cache hits are likely. We may not need
       to reach into main memory as frequently, unless we've escaped enough
       characters to fill a cache line.
       
       This commit is a proof of concept, it's not ideal that we're combining
       two separate json string escaping implementations in JsonWriter:
       `StringBuilders.escapeJson` and `JsonWriter.quoteString`
   ```


----------------------------------------------------------------
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:
[email protected]


Reply via email to