-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution NAMER
-
Fully Compatible
-
Execution Team 2023-10-30
In SortedDataIndexAccessMethod::findSingle, there is a call to BSONObj::stripFieldNames which walks the BSONObj and allocates a new one. For simple IDHack queries where _id is a scalar, this is unnecessary since field names are not stored in the keystring.
I do not know if this function can be omitted in all cases though as I am not very familiar with key string.
POC: https://github.com/10gen/mongo/commit/b2fe0cbb1697e55daa60991389e951bcc9eb8aed