Improve copy assignment performance of KeyString::Value

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.1
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • Execution Team 2019-08-26
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Copy assignment of KeyString::Value is currently slow for a few reasons:

      • It must call the copy assignment for TypeBits, preventing the structure's assignment from being inlined efficiently. This can be improved by transparently always appending TypeBits to the end of the buffer, but never including it in the actual KeyString.
      • It must call the destructor for the local ConstSharedBuffer, and created a copy of the source buffer, subtracting and adding an atomic ref-counter on each. This shows up in perf and can be improved by implementing a swapping assignment like BSON does today.

            Assignee:
            Louis Williams
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: