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

Delay short-circuiting skip_while and filter adaptors for better perforamnce in case of multi databases #177

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

victorporof
Copy link
Contributor

@victorporof victorporof commented Nov 14, 2019

When generating iterators for multi databases, the (key, values) iterator generated by a snapshot is first flattened into (key, value) iterator; then, this iterator is transformed with skip_while and filter adaptors.

This approach can be less performant in a situation where a key can contain multiple values. In these situations, these adaptors do extra work because the flattening happens beforehand. Ideally, flattening should happen afterwards, which this PR implements.

Signed-off-by: Victor Porof victor.porof@gmail.com

…perforamnce in case of multi databases

Signed-off-by: Victor Porof <victor.porof@gmail.com>
@victorporof victorporof changed the base branch from lifetimes to safe-mode November 15, 2019 09:32
@victorporof victorporof merged commit 3ee55b5 into safe-mode Nov 15, 2019
@victorporof victorporof deleted the optimize-multi-iters branch November 15, 2019 09:32
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