Suboptimal performance for Lucene queries within JIRA instances with a large number of projects and issue security levels

XMLWordPrintable

      User symptoms:

      Generally, Lucene searches taking upwards of 10 seconds each time. Examples:

      • Calculating aggregate time tracking information for a set of issues takes a long time
      • Lazy loading portlets (Saved Filters portlet) takes a long time to display the counts of issues in each filter

      Note that the performance issues are more problematic for users with more permissions in the JIRA instance. That is, an administrator with full access to every project and issue security level with suffer a greater performance hit than a user with more restricted permissions for the same query.

      Technical information:

      In Lucene, a CachingWrapperFilter can be used to wrap another filter, so that the resulting BitSet (which is used to filter out matching results from a search) is cached, because this BitSet can be expensive to create when there are a lot of terms in the underlying query.

      In JIRA, there is a bug that means that the CachingWrapperFilter for each SearchRequest and user is never cached, meaning that every time it is used, the BitSet needs to be reconstructed. If this is remedied, there will be a significant speed increase to Lucene queries in JIRA instances with a large number of projects and/or issue security levels, as this filter is used extensively throughout the Lucene subsystem.

            Assignee:
            Michael Tokar
            Reporter:
            Michael Tokar
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 4h
                4h