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

Optimize BSONObjBuilder::numStr

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0-rc4
    • Component/s: Internal Code
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Platform C (11/20/15), Platform D (12/11/15)

      Description

      In the getMore command we need to construct a large BSON array of cursor response documents. If the documents are small, the indices of the elements can hit well over 100, which is the limit of the fast path for BSONObjBuilder::numStr. Under vTune we can see that we are spending almost 25% of our cycles in numStr for an in-memory collection scan workload.

        Attachments

        1. find.js
          0.2 kB
        2. insert.js
          0.7 kB
        3. numstre.png
          numstre.png
          48 kB

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: