Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search: Reduce memory usage during fetch source sub phase.
If includes or excludes are set XContentFactory.xcontentBuilder() allocates a new BytesStreamOutput using the default page size which is 16kb. Can be optimized to use the length of the sourceRef because that is the maximum possible size that the streamOutput will use. This redcues the amount of memory allocated for a request that is fetching 200.000 small documents (~150 bytes each) by about 300 MB Close #8138
- Loading branch information