-
Type: Sub-task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
Use Case
As a... driver engineer
I want... to remove extraneous calls to Buffer.subarray
So that... the performance of bson and the driver will improve
User Impact
Increases performance for users
Dependencies
N/A
Unknowns
N/A
Acceptance Criteria
Implementation Requirements
- Update ByteUtils.toUTF8 in src/utils/node_byte_utils.ts to take in start and end and pass them through to the call to toString rather than calling Buffer.subarray directly inside getValidatedString.
Update ByteUtils.UTF8 to not make a call to ByteUtils.toLocalBufferTypeAddress any typescript issues this causes
Testing Requirements
- Manually check that the performance results from making the aforementioned changes result in the expected performance increase seen in the results of the investigation for
NODE-4283
Documentation Requirements
N/A
Follow Up Requirements
- Create ticket to add bson regression tests for this code path
- Create ticket to further audit ByteUtils for other opportunities for performance gains
- is duplicated by
-
NODE-5358 Address performance regressions introduced in bson v5.0.0
- Closed