Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-14053

MappedSortComparator needs to reduce its memory footprint

    XMLWordPrintable

Details

    Description

      The current code for MappedSortComparator has some unwanted hard memory references to an array of strings.

             final String field = fieldname.intern();
              final Object[] cachedValues = getLuceneValues(field, reader);
              final Comparator comparator = sorter.getComparator();
      
              return new ScoreDocComparator()
              {
                  public int compare(ScoreDoc i, ScoreDoc j)
                  {
                      Object value1 = cachedValues[i.doc];
                      Object value2 = cachedValues[j.doc];
      

      Since Lucene caches the results it means that the memory footprint of JIRA is much bigger than it could be. Especially over time as more searches are done.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bbaker ɹǝʞɐq pɐɹq
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: