-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: BSON, Implementation
-
None
We call bson_init_static repeatedly and redundantly (e.g. on every element access).
We should call bson_init_static once on view creation and cache the result.
Update: we can't cache a bson_t because it uses internal references and it therefore non-copyable without dangling pointers. We've proposed CDRIVER-2064, which would allow us to construct bson_iter_t structures directly directly from the view buffer.
- depends on
-
CDRIVER-2064 Add bson_iter_init_from_data function
- Closed
- related to
-
CXX-1066 Audit all libmongoc and libbson calls for error handling
- Closed