NamespaceStringOrUUID forces unnecessary allocations and copies

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0, 7.0.0-rc6
    • Affects Version/s: None
    • Component/s: None
    • None
    • Serverless
    • Fully Compatible
    • v7.0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Matt Broadstone
            Reporter:
            Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: