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

Optimize BSONObjBuilder::numStr

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc4
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • Platform C (11/20/15), Platform D (12/11/15)

      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.

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

            Assignee:
            adam.midvidy Adam Midvidy
            Reporter:
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: