Reduce use of stringstream in BSONObj.jsonString

XMLWordPrintableJSON

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

      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 (Inactive)
            Reporter:
            Kashish Garg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: