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

Elide useless constructor calls for trivially-constructible Decorations

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • None
    • None
    • Service Arch
    • Fully Compatible
    • v7.0
    • Service Arch 2023-05-15, Service Arch 2023-05-29, Service Arch 2023-06-12

    Description

      Decoration construction, especially for OperationContext takes a significant amount of time, as there is a very high number of decorations on that type. The cost comes from virtual function dispatch to invoke the constructors. Many of the decorations are trivially constructible and so don't really need any action taken at construction. The task of this ticket is to figure out how to avoid invoking constructor functions that don't need to do any work in order to speed up the construction and destruction of Decorable objects. Presumably this would be similar to SERVER-69383.

      If we cannot do this, we should instead investigate combining related decorations into structures to reduce the number of constructor/destructor actions.

      Attachments

        1. decorations_all.txt
          26 kB
        2. screenshot-1.png
          screenshot-1.png
          206 kB

        Activity

          People

            billy.donahue@mongodb.com Billy Donahue
            schwerin@mongodb.com Andy Schwerin
            Votes:
            0 Vote for this issue
            Watchers:
            21 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: