Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3015

Use Buffer equals when comparing ObjectId

    • 2
    • Not Needed

      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.

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            alexander.golin@mongodb.com Alexander Golin (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: