-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
When doing a modifier-style update ($set, $unset, $inc etc), the query system generates a doc_diff from the modifier tree as it is applying the update. This uses the V2LogBuilder which allocates roughly one node per modification, plus nodes representing sub-objects and arrays.
We should look into optimizing this, either to avoid the tree allocations completely (perhaps if the update is simple and doesn't touch many overlapping fields), or to make them cheaper.
This could be done at the same time as SERVER-97094, or independently. This task should be somewhat easier than SERVER-97094, since we have already analyzed the query and understand the shape of the update.
Before doing this task, we should also construct a test that stresses the diff building code.
- is related to
-
SERVER-97094 Optimize update() document diffing algorithm to do fewer allocations
- Open