Directory ApacheDS
  1. Directory ApacheDS
  2. DIRSERVER-1808

We should evaluate the Scope and any other index in a fliter only when the # of candidate is above a threshold

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M10
    • Fix Version/s: 2.0.0-M11
    • Component/s: None
    • Labels:
      None

      Description

      Currently, we evaluate all the nodes in a filter, regardless to the result of previous evaluation. It makes no sense to evaluate some & node if one node evaluates to 0 or 1. It makes no sense to evaluate some following nodes of a | node if one node evaluate to MAX.

      We could probably save a few CPU this way.

        Activity

        Hide
        Emmanuel Lecharny added a comment -

        I changed the evaluator method to stop evaluating & nodes as soon as we have a 0, and to avoid evaluating the scope node if the value is 1
        The | node will stop evaluating as soon as the count is MAX_VALUE.
        The scope node is moved to the end of the filter.

        Show
        Emmanuel Lecharny added a comment - I changed the evaluator method to stop evaluating & nodes as soon as we have a 0, and to avoid evaluating the scope node if the value is 1 The | node will stop evaluating as soon as the count is MAX_VALUE. The scope node is moved to the end of the filter.
        Hide
        Emmanuel Lecharny added a comment -

        The (ObjectClass=*) node is now removed from the filter : it's useless.

        Show
        Emmanuel Lecharny added a comment - The (ObjectClass=*) node is now removed from the filter : it's useless.
        Show
        Emmanuel Lecharny added a comment - Fixed with : http://svn.apache.org/r1449313 http://svn.apache.org/r1449316
        Hide
        Emmanuel Lecharny added a comment -

        Closed all the resolved issues

        Show
        Emmanuel Lecharny added a comment - Closed all the resolved issues

          People

          • Assignee:
            Unassigned
            Reporter:
            Emmanuel Lecharny
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development