SERVER-131871ClosedDuplicate
Optimize multi-field updates on wide documents: avoid repeated linear child lookups in UpdateObjectNode
Updating many fields of a wide document (an object with a large number of sibling fields) is {{O(n^2)}} in the number of fields, because each targeted field is located with an independent linear {{mutablebson::Element::findFirstChildNamed()}} scan over the same sibling chain. This proposal adds a per-{{{}apply(){}}}, target-only field-name index so those repeated lookups become {{{}O(1){}}}, reducing the overall cost from {{O(n^2)}} to {{{}O(n){}}}. It is guarded by a runtime-tunable threshol