Reduce CanonicalQuery creation overhead by avoiding BSONObj creation

XMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • v8.0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The investigation in PERF-5073 found that a key contributor to the regressions in the initialization of CanonicalQuery is the creation of a new BSONObj for each MatchExpression.

      By keeping alive or moving the original BSONObj, we can reduce the cost of CanonicalQuery initialization in some cases by 50%.

       

      This ticket will introduce the final change in expression_leaf.cpp and expression_leaf.h to remove the use of _backingBSON BSONObj

              Assignee:
              Matt Olma
              Reporter:
              Matt Olma
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: