-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Platforms 2017-06-19, Platforms 2017-07-10
The bsonExtract methods in bson_extract.cpp all rely on bsonExtractField() to parse the provided BSONObj. In the case where the requested field is missing, bsonExtractField() will generate an error Status object and build an error message using str::stream() both of which are expensive operations for a non-error path.
We should optimize the "WithDefault" methods to avoid generating an error Status object in the case where the requested field does not exist.
- related to
-
SERVER-27265 Fast bsonExtract handling for NoSuchKey + no default, in non-error case
- Closed