Modify TelemetryContextHolder to use Decoration optimization

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Programmability 2026-01-19, Programmability 2026-02-02
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Decorable has constructor (and soon, destructor) optimizations for shared_ptr, unqiue_ptr, and boost::optional. Wrapping the decoration in a class disables those optimizations, adding to the opCtx construction cost in the fast path. This change keeps the holder class as an interface, while making the decoration a shared_ptr, enabling the optimization.

      Most of this patch is boring caller changes, as we're now passing around a holder which contains a reference to a shared_ptr, instead of a reference to a holder which is a shared_ptr.

            Assignee:
            Ronald Steinke (Inactive)
            Reporter:
            Ronald Steinke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: