-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
There are a couple of typically problematic patterns that could indicate a potential performance bottleneck:
- Repeated calls to BSONObj::getField (e.g. we want to retrieve multiple fields in a loop) rather than an up-front call to getFields or iterating over all fields in the BSONObj in one go rather than doing a linear search for each field)
- Uses of BSON macros or BSONObjBuilder outside of testing/parsing code
We should see if we can spot any of these & fix them- and consider introducing some kind of linting rule or automation to try to prevent new instances of these patterns emerging.