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

Reduce use of stringstream in BSONObj.jsonString

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.1.2
    • Affects Version/s: None
    • Component/s: Performance
    • None
    • Fully Compatible
    • Platforms 2018-08-13

      Right now, in order to convert a BSON Object into a JSON string, we recursively call the jsonString() function, which creates a new stringstream for every call. Creating a new stringstream every time is quite expensive. We should only create it once and pass it in as an argument for the successive recursive calls to help improve auditing performance.

            Assignee:
            kashish.garg Kashish Garg
            Reporter:
            kashish.garg Kashish Garg
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: