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

Reduce use of stringstream in BSONObj.jsonString

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.2
    • Component/s: Performance
    • Labels:
      None

      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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: