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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.6.1, 7.0, 8.0
    • 7.1
    • None
    • 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.png
          47 kB
          Michael Braun
        2. SOLR-11242.patch
          2 kB
          Michael Braun
        3. TestQueryPerfSpeedup.java
          4 kB
          Michael Braun

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment