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

NamespaceStringOrUUID forces unnecessary allocations and copies

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 7.1.0-rc0, 7.0.0-rc6
    • None
    • None
    • None
    • Serverless
    • Fully Compatible
    • v7.0

    Description

      The nss() function forces callers to always make a copy of the Namespace string. NamespaceString checks are not uncommon, so the cost of these small memory allocations can add up over time.

      We should just use a raw pointer or return an optional reference to the underlying NSS.

      The specific function call that I saw show up when profiling was this isSystemDotProfile function call, which is in our hot write path on the primary.

      Attachments

        Activity

          People

            matt.broadstone@mongodb.com Matt Broadstone
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: