mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 23:15:04 +00:00
* Resolve TODO in `readString` by moving to reading chunks of `byte[]` instead of going byte by byte * Motivated by `readString` showing up as a significant user of CPU time on the IO thread in Rally PMC benchmark * Benchmarking this: * Could not reproduce a slowdown in the potential worst case (one or two non-ascii chars) since in this case the cost of creating the string itself exceeds the read times anyway * Speedup for 50%+ for reading 200 char ascii strings from `ByteBuf` or pages bytes backed streams * Longer strings obviously get bigger speedups * More ascii chars -> more speedup