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

Switch GeoPointTermsEnum range list to use a reusable BytesRef

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.4, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      GeoPointTermsEnum currently constructs a BytesRef for every computed range, then sorts on this BytesRef. This adds an unnecessary memory overhead since the TermsEnum only requires BytesRef on calls to nextSeekTerm and accept and the ranges only need to be sorted by their long representation. This issue adds the following two improvements:

      1. Lazily compute the BytesRef on demand only when its needed
      2. Add a single, transient BytesRef to GeoPointTermsEnum

      This will further cut back on heap usage when constructing ranges across every segment.

        Attachments

        1. LUCENE-6777.patch
          5 kB
          Nicholas Knize
        2. LUCENE-6777.patch
          5 kB
          Nicholas Knize
        3. LUCENE-6777.patch
          5 kB
          Nicholas Knize
        4. LUCENE-6777.patch
          5 kB
          Nicholas Knize

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nknize Nicholas Knize
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: