-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: BSON
https://github.com/mongodb/js-bson/pull/287
This PR updates ObjectId #equals to use internal Node.js buffer #equals function when comparing two ObjectId objects.
While tracing performance issue in our MongoDB based app, I found #equals was calling toString() when comparing two ObjectId, which turns out to be quite inefficient. In our own testing this change appears to be much, much faster when comparing two ObjectIds.
- is duplicated by
-
NODE-3036 refactor: use Buffer within ObjectId#equals
- Backlog