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

Switch GeoPointTermsEnum range list to use a reusable BytesRef

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.4, 6.0
    • None
    • None
    • 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
          Nick Knize
        2. LUCENE-6777.patch
          5 kB
          Nick Knize
        3. LUCENE-6777.patch
          5 kB
          Nick Knize
        4. LUCENE-6777.patch
          5 kB
          Nick Knize

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nknize Nick Knize
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: