[SERVER-80361] Improve performance of NamespaceStringUtil::deserialize Created: 23/Aug/23  Updated: 05/Feb/24

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Didier Nadeau
Resolution: Unresolved Votes: 0
Labels: ntdi_nice_to_have, ntdi_performance
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-83583 Use DatabaseNameView for lookup in DB... Closed
Assigned Teams:
Service Arch
Sprint: Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19
Participants:
Story Points: 3

 Description   

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.



 Comments   
Comment by Sophia Tan [ 31/Aug/23 ]

The motivation of this ticket is performance concern. 

Generated at Thu Feb 08 06:43:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.