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 exponential complexity when reading snapshot map. #9

Merged

Conversation

winged
Copy link
Member

@winged winged commented May 24, 2016

The previous version would run through 3 levels of loops, each across all existing
snapshots. Thus, if we had ~1000 snapshots (real-world usage), this would cause a
billion iterations.

This patch now only iterates over the whole snapshot list exactly once.

This fixes #8

The previous version would run through 3 levels of loops, each across all existing
snapshots. Thus, if we had ~1000 snapshots (real-world usage), this would cause a
billion iterations.

This patch now only iterates over the whole snapshot list exactly once.
@winged winged force-pushed the fix_exponential_complexity_in_read_snapshot_map branch from 6e417af to 491652c Compare May 24, 2016 11:11
@winged winged merged commit 40c1108 into adfinis:master May 24, 2016
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.

read_snapshot_map is slow
1 participant