Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15057

avoid unnecessary object retention in FacetRangeProcessor

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.8, 9.0
    • None
    • None

    Description

      • The (private) doSubs method is a no-op if there are no sub-facets.
      • The (private) intersections and filters arrays are only used by the doSubs method.
      • The (private) rangeStats method currently always populates the intersections and filters arrays, even when nothing actually subsequently uses them.
      • If rangeStats only populated the intersections array when it's actually needed then the DocSet intersection object would remain local in scope and hence the garbage collector could collect it earlier.

      https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.7.0/solr/core/src/java/org/apache/solr/search/facet/FacetRangeProcessor.java#L531-L555

      Attachments

        Issue Links

          Activity

            People

              cpoerschke Christine Poerschke
              cpoerschke Christine Poerschke
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 20m
                  20m