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

minor optimizations to MultiDocs(AndPositions)Enum.reset()

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.10, 6.0
    • None
    • None
    • New

    Description

      This method is called by merging for each term, potentially many times, but only returning a few docs for each invocation (e.g. imagine high cardinality fields, unique id fields, normal zipf distribution on full text).

      Today we create a new EnumWithSlice[] array and new EnumWithSlice entry for each term, but this creates a fair amount of unnecessary garbage: instead we can just make this array up-front as size subReaderCount and reuse it.

      Attachments

        1. LUCENE-5798.patch
          3 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: