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
    • None
    • Fully Compatible
    • Platform C (11/20/15), Platform D (12/11/15)
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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. find.js
          0.2 kB
          Adam Midvidy
        2. insert.js
          0.7 kB
          Adam Midvidy
        3. numstre.png
          48 kB
          Adam Midvidy

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

              Created:
              Updated:
              Resolved: