Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-745

Make inspection of BooleanQuery more efficient

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Just attempting to inspect a BooleanQuery allocates two new arrays. This could be cheaper.

        Activity

        Hide
        yseeley@gmail.com Yonik Seeley added a comment -

        Closing... this patch has already been committed.

        Show
        yseeley@gmail.com Yonik Seeley added a comment - Closing... this patch has already been committed.
        Hide
        kevinoliver Kevin Oliver added a comment -

        This should also be considered along with LUCENE-711, which sizes some of the other Vectors more appropriately.

        Show
        kevinoliver Kevin Oliver added a comment - This should also be considered along with LUCENE-711 , which sizes some of the other Vectors more appropriately.
        Hide
        yseeley@gmail.com Yonik Seeley added a comment -

        Changes:

        • Vector changed to ArrayList for efficiency to remove unneeded synchronization
        • added clauses() method to return the List
        • changed getClauses() to pre-allocate the correct size, removing one allocation
        Show
        yseeley@gmail.com Yonik Seeley added a comment - Changes: Vector changed to ArrayList for efficiency to remove unneeded synchronization added clauses() method to return the List changed getClauses() to pre-allocate the correct size, removing one allocation

          People

          • Assignee:
            Unassigned
            Reporter:
            yseeley@gmail.com Yonik Seeley
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development