-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
Execution Team 2021-04-19
BSONIteratorSorted traverses the provided BSONObj to collect all field names. But when storing it just uses char*.
This leads to the comparator having to re-calculate the field name size over and over again during the sorting stage.
Later when a user is extracting BSONElements in sorted order the field name sizes are calculated yet again.
We should be able to just calculate it once and then reuse.
- related to
-
SERVER-55484 Improve efficiency of BucketCatalog::insert
- Closed