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

Improve copy assignment performance of KeyString::Value

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.3.1
    • None
    • None
    • None
    • Fully Compatible
    • Execution Team 2019-08-26
    • 0

    Description

      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.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: