Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-102175

Reduce copying of intrusive_ptrs in DocumentSource and Pipeline

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Query Execution
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Both Pipeline and DocumentSource copy {{intrusive_ptr}}s unnecessarily. Instead, they can be moved to avoid a branch and the modification of the atomic counter variable.

      Additionally, a few methods in Pipeline (usedDisk, canParameterize) can be made const.

      Finally, the files containing Pipeline and DocumentSource include a lot of headers unnecessarily. We should remove the unnecessary headers to reduce dependencies.

            Assignee:
            jan.steemann@mongodb.com Jan Steemann
            Reporter:
            jan.steemann@mongodb.com Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None