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

Reduce the cost of extractOrAppendOk

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.4.0-rc6, 4.7.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • v4.4
    • Service arch 2020-05-18

      Approximately 1.2% of samples collected as part of profiling mongos correspond to extractOrAppendOk(). The computation complexity of this method (see here) could be reduced through the following:

      • Replace the call to appendSimpleCommandStatus() with this line.
      • Potentially caching some of the most frequently used fields in BSONObjBuilder to obviate the call to asTempObj() (and potentially scanning the entire BSON object).

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: