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

use set for membership queries #4459

Merged
merged 2 commits into from
May 11, 2022
Merged

use set for membership queries #4459

merged 2 commits into from
May 11, 2022

Conversation

dholth
Copy link
Contributor

@dholth dholth commented May 10, 2022

speeds conda index when the number of unchanged packages is large

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label May 10, 2022
unchanged_set = sorted(old_repodata_fns - update_set - remove_set - ignore_set)
unchanged_set = set(old_repodata_fns - update_set - remove_set - ignore_set)

assert isinstance(unchanged_set, set) # faster `in` queries
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevent future problems

Copy link

@barabo barabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a nice find! Just a couple more little things to tighten it more.

Copy link

@barabo barabo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kenodegard kenodegard enabled auto-merge (squash) May 11, 2022 18:46
@kenodegard kenodegard disabled auto-merge May 11, 2022 18:46
@kenodegard kenodegard merged commit 6ccbaf4 into conda:master May 11, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label May 12, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants