-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: BSON, Performance
Use Case
As a BSON user
I want deserialization to be as fast as possible
So that my applications are less bottlenecked on BSON parsing
billouboq has created PR #611: Improve deserialisation performance in js-bson
Migrating allocations (Set and DataView) to the sections of code only where they are used may realize performance gains.
User Impact
- deserialization is a hot code path, used for all MongoDB messages and data
Dependencies
- The driver, shell
Unknowns
- Will moving the Set and DataView allocations improve performance?
- Notably, will nesting the DataView incur a performance hit with increased garbage collection?
Acceptance Criteria
Implementation Requirements
- UTF8 validation keys Set can be moved to only be created when the UTF settings are provided
- The DataView used for parsing 64bit floats can be nested under the parsing case for BSON doubles
Testing Requirements
- Implement performance test to target the changes
- Inspect CI performance measurements
- Inspect time spent in GC before an after the change
Documentation Requirements
- Release highlights
Follow Up Requirements
- N/A
- depends on
-
NODE-3654 Benchmark js-bson performance and EOL bson-ext
- Development Complete