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

Reduce use of stringstream in BSONObj.jsonString

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor - P4 Minor - P4
    • 4.1.2
    • None
    • Performance
    • None
    • Fully Compatible
    • Platforms 2018-08-13

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: