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

Replace std::move of stack-allocated QueryPlannerParams with references/pointers

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc3
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • Fully Compatible
    • v8.0
    • QO 2024-04-15, QO 2024-04-29

      In getExecutorFind(), we see a performance overhead from repeatedly copying QueryPlannerParams objects variously through the stack. While the original calls use std::move() on the QueryPlannerParams objects, they're stack allocated, not heap allocated, so there's still a copy involved.

      Converting these into references or heap allocating them with smart pointers will improve performance simply by reducing the number of copies being made.

            Assignee:
            william.qian@mongodb.com William Qian
            Reporter:
            william.qian@mongodb.com William Qian
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: