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

QueryParser should avoid creating an LookaheadSuccess(Error) object with every instance

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.6.1, 7.0, master (8.0)
    • Fix Version/s: 7.1
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      Sampling of an application which includes a very heavy query load testing against an EmbeddedSolrServer reveals a huge amount of the time spent on initialization of the QueryParser itself, specifically an internal class called LookaheadSuccess which extends from Error. With every instance of QueryParser created, it spends time populating the stacktrace for this object, which is created as a final instance variable (the variable called jj_ls).

      Ideally an exception shouldn't be used as a signaling mechanism, or at the very least, not an exception created on every single object instantiation.

        Attachments

        1. SOLR-11242.patch
          2 kB
          Michael Braun
        2. SOLR-11242.png
          47 kB
          Michael Braun
        3. TestQueryPerfSpeedup.java
          4 kB
          Michael Braun

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                mbraun688 Michael Braun
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: