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

Improve performance of NamespaceStringUtil::deserialize

    • Service Arch
    • Fully Compatible
    • Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19, Service Arch 2024-03-18, Service Arch 2024-04-01
    • 2

      One of NamespaceStringUtil's deserialize() overrides takes in a tenantId object and two StringData objects (in addition to the serialization context).  The two StringData objects represent the database string and the collection strings, which we can concatenate and call the deserialize() override that takes in a tenantId and one StringData object.  However, this string operation is expensive when we note that we have a NamespaceString constructor that does this for us but optimized for the internal byte array structure.

      Investigate passing the two StringData objects down to the NamespaceString constructor.  This may end up with duplicated code which we will need to take care of managing in the meantime, but can provide real performance benefits.

            Assignee:
            mathis.bessa@mongodb.com Mathis Bessa (Inactive)
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: