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

fix(shell-api): improve AbstractCursor iteration performance MONGOSH-1688 #1920

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

addaleax
Copy link
Contributor

  • Delegate cursor iteration to the driver where possible
  • Do not call the wrapped .tryNext() method from inside other shell API methods, and instead only call an internal unwrapped version of it (similar to db.runCommand() vs db._runCommand()

This results in a 60% improvement of runtime in local testing on the db_cursor_iteration_plainvm benchmark.

…1688

- Delegate cursor iteration to the driver where possible
- Do not call the wrapped `.tryNext()` method from inside other
  shell API methods, and instead only call an internal unwrapped
  version of it (similar to `db.runCommand()` vs `db._runCommand()`

This results in a 60% improvement of runtime in local testing on the
`db_cursor_iteration_plainvm` benchmark.
@lerouxb
Copy link
Contributor

lerouxb commented Mar 28, 2024

🔥

@addaleax addaleax merged commit cdce3b8 into main Apr 2, 2024
63 checks passed
@addaleax addaleax deleted the 1688-dev branch April 2, 2024 16:46
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.

2 participants