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

optimize Decorations that are initialized to an "empty" state

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • Service Arch 2023-06-26, Service Arch 2023-07-10, Service Arch 2023-07-24, Service Arch 2023-08-07, Service Arch 2023-08-21, Service Arch 2023-09-04

      SERVER-76788 elided constructors for trivially-constructible Decorations. That work was not as efficacious as it could have been because it turns out that only a few relevant decorations are truly trivially constructible.

      However, many decorations are initialized to an "empty" value. It's just that doing so isn't technically trivial, so we have to run a nop constructor for them. We do know that the buffer for Decorations is memset with 0-bytes. So we could invent a small wrapper type that considers the zero-filled representation to be valid and empty, and we would have no constructor work necessary for those.

      It's still unclear that doing this optimization would save initialization time.
      SERVER-78390 will make this easier to work on.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: