Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-9059

Reduce garbage created by ByteBuffersDataOutput

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.4
    • None
    • None
    • New

    Description

      When profiling indexing because of LUCENE-9027, I noticed that indexing produces a lot of unnecessary garbage because of ByteBuffersDataOutput, which can easily get fixed:

      • reset() is implemented using streams, which apparently create lots of objects
      • copyTo has an optimization for the case that ByteBuffers are backed by an array that never gets used because toBufferList makes the buffers read-only, which in-turn disallows access to the array

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpountz Adrien Grand
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m