Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow build XContent directly from Writable (#73804)
Today, writing a Writable value to XContent in Base64 format performs these steps: (1) create a BytesStreamOutput, (2) write Writable to that output, (3) encode a copy of bytes from that output stream, (4) create a string from the encoded bytes, (5) write the encoded string to XContent. These steps allocate/use memory 5 times than writing the encode chars directly to the output of XContent. This API would help reduce memory usage when storing a large response of an async search. Relates #67594
- Loading branch information
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters