-
Type: Sub-task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
Use Case
As a Node.js engineer
I want improve the performance of cursor iteration
So that we remain in line with the baseline performance
User Experience
- No changes to performance
Dependencies
- None
Risks/Unknowns
- What could go wrong while implementing this change? (e.g., performance, inadvertent behavioral changes in adjacent functionality, existing tech debt, etc)
- potential for more BSON option related bugs, ideally testing coverage should prevent this.
- performance should improve, testing should confirm this
- Is there an opportunity for better cross-driver alignment or testing in this area?
- No
- Is there an opportunity to improve existing documentation on this subject?
- Yes, internal API docs can assist maintainers in understanding how to handle BSON options. Esp with cursors because of their lazy decoding
Acceptance Criteria
Implementation Requirements
- when shift is called, store the BSON options on the CursorResponse instance
- reuse the stored bson options for every subsequent decoding
Testing Requirements
- Ensure bson options are stored and used again without rebuilding them on every shift call
Documentation Requirements
- None, other than helpful inline comments
Follow Up Requirements
- Replicate changes to 6.8 backport