Use faster string construction for PlanExplainerExpress::getPlanSummary

XMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • v8.0
    • 200
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The string construction here is not efficient because it reallocates a new string every for every += operator along with a copy.

      To be maximally efficient, we could have the caller pass in a StackStringBuilder to getPlanSummary() to avoid any memory allocations in most cases. Otherwise, a regular StringBuilder should be better than what exists currently.

      CC colin.stolley@mongodb.com

            Assignee:
            Colin Stolley
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: