[SERVER-54595] StringData(ptr, length) invariant should only be checked in debug builds Created: 17/Feb/21  Updated: 25/Feb/22  Resolved: 24/Feb/22

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Matt Diener (Inactive)
Resolution: Done Votes: 0
Labels: servicearch-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Sprint: Service Arch 2022-2-21, Service Arch 2022-03-07
Participants:
Linked BF Score: 135
Story Points: 2

 Description   

StringData is supposed to be a "free" type. That invariant leads to the constructor being called out of line and all of the overhead involved in that. It was lighting up over 2% in one profile.



 Comments   
Comment by Githook User [ 23/Feb/22 ]

Author:

{'name': 'Matt Diener', 'email': 'matt.diener@mongodb.com', 'username': 'mattdiener'}

Message: SERVER-54595 StringData(const char*, size_t) only checks invariant in debug
Branch: master
https://github.com/mongodb/mongo/commit/359ecf5230af8f0b9db7fb92fecdf68769d95d0e

Generated at Thu Feb 08 05:33:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.