-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Performance
-
None
-
Query Execution
The IDL definitions of the find and aggregate commands use object_owned for some fields that are documents, which involves making a copy of subdocument's BSON data during parse. This can be expensive, especially since it is performed on every operation. anna.wawrzyniak@mongodb.com estimates that somewhere in the neighborhood of 0.3% of an entire find query's execution time could be spent on these copies.
We should update these command definitions to use object rather than object_owned to avoid performing these copies/allocations. In order to ensure these documents don't point to invalid data once the parsed-from request goes out of scope, we can use the IDL-generated parseSharingOwnership instead of parse to ensure the parsed IDL struct keeps an anchor around. We should do this for any operation we care about the performance of, starting with at least find and aggregate.
- is depended on by
-
SERVER-91290 Use object rather than object_owned in GenericArguments
- Blocked
- is related to
-
SERVER-91277 Use document views rather than making copies when parsing aggregate requests
- Backlog