Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Add global option to flatten when appending in XmlStringBuilder
For certain use cases, this provides a performance improvement, probably due better cache locality. However, it comes with the cost of additional memory consumption. This was initially suggested by Boris Grozev, who also reported a significant performance problem of XmlStringBuilder/LazyStringBuilder. However, the main cause of the performance probelm was the missing caching of LazyStringBuilder. The length of the lazy string is now cached by LazyStringBuidler since 70e4830 ("[core] Cache length in LazyStringBuilder"), which accounts for large performance improvement. A significantly smaller improvement is achieved by this commit and setting XmlStringBuilder.FLAT_APPEND to 'true'. Suggested-by: Boris Grozev <[email protected]>
- Loading branch information