mirror of
https://github.com/apache/druid.git
synced 2025-02-12 04:55:12 +00:00
This PR generally improves the working of WriteOutBytes and WriteOutMedium. Some analysis of usage of TmpFileSegmentWriteOutMedium shows that they periodically get used for very small things. The overhead of creating a tmp file is actually very large. To improve the performance in these cases, this PR modifies TmpFileSegmentWriteOutMedium to return a heap-based WriteOutBytes that falls back to making a tmp file when it actually fills up. --------- Co-authored-by: imply-cheddar <eric.tschetter@imply.io>