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

Improve initial metadata read using bson instead of unmarshal #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eparker-tulip
Copy link
Contributor

Before entries can be masked out, or filtered by shard, an initial set of oplog entry metadata needs to be processed. This is currently done via the rawOplogEntry type which is populated using bson.Unmarshal(), but this is much slower compared to accessing the necessary properties directly using bson methods. Additionally, the namespace entry can be accessed before anything else, so that filtering can happen as far upstream as possible.

Benchmarking shows that small entries are 2x as fast, while the largest entries can be 100x faster.

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

Successfully merging this pull request may close these issues.

1 participant