Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(main): release 6.10.1 [skip-ci] #734

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 20, 2024

🌱 A new release!

6.10.1 (2024-11-27)

The MongoDB Node.js team is pleased to announce version 6.10.1 of the bson package!

Release Notes

Fix issue with the internal unbounded type cache

As an optimization, a previous performance improvement stored the type information of seen objects to avoid recalculating type information. This caused an issue in the driver under extreme load and high memory usage as the cache grew. The assumption was that garbage collection would clear it enough to sustain normal operation. The cache is now removed and other optimal type checking is used in its place.

Cache the hex string of an ObjectId lazily

When ObjectId.cacheHexString is set to true we no longer convert the buffer to a hex string in the constructor, since the cache is already being filled in any call to objectid.toHexString().

Additionally, if a string is passed into the constructor we can cache this immediately as there is no performance impact and no extra memory that needs to be allocated.

This improves the performance for situations where you are parsing ObjectIds from a string (ex. JSON) and want to avoid recalculating the hex. It also improves situations where you have ObjectIds coming from BSON and only convert some of them strings perhaps after applying some filter to eliminate some.

With cacheHexString enabled deserializing ObjectIds from BSON shows ~80% performance improvement and toString-ing ObjectIds that were constructed from a string convert ~40% faster!

Thanks to @SeanReece for contributing this improvement!

Bug Fixes

Performance Improvements

Documentation

We invite you to try the bson library immediately, and report any issues to the NODE project.


@github-actions github-actions bot force-pushed the release-please--branches--main--components--bson branch from bedb6a5 to 6faaa1a Compare November 21, 2024 19:36
@github-actions github-actions bot force-pushed the release-please--branches--main--components--bson branch from 6faaa1a to ce03d89 Compare November 27, 2024 17:33
@nbbeeken
Copy link
Contributor

nbbeeken commented Dec 3, 2024

run release_notes

1 similar comment
@nbbeeken
Copy link
Contributor

nbbeeken commented Dec 3, 2024

run release_notes

@nbbeeken nbbeeken merged commit 26549d9 into main Dec 3, 2024
@nbbeeken nbbeeken deleted the release-please--branches--main--components--bson branch December 3, 2024 21:09
Copy link
Contributor Author

github-actions bot commented Dec 3, 2024

🤖 Created releases:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant