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

Optimize memory footprint of optional fields in query_stats::KeyGenerators

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Optimization
    • Fully Compatible
    • QO 2023-06-26, QO 2023-07-10, QO 2023-07-24
    • 164

      I was reading over this page after I was surprised by the size of some of these objects: https://www.boost.org/doc/libs/1_59_0/libs/optional/doc/html/boost_optional/tutorial/performance_considerations.html

       

      It is probably worth doing some of that bool _has_allow_partial_results pattern rather than all the boost::optionals we have here: https://github.com/mongodb/mongo/blob/cf00278a5230148eaf71c04df84f6c6de77decee/src/mongo/db/query/query_stats_find_key_generator.h#L91

            Assignee:
            william.qian@mongodb.com William Qian
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: