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

Cache scope priorities #1071

Merged
merged 1 commit into from
Dec 6, 2023
Merged

Conversation

sasa1977
Copy link
Contributor

Currently, every call to format_issue recalculates the scope priorities. This significantly hurts performance when many issues are reported.

This change adds another ETS table (following the present cache design) to lazily cache these prios. On a large project with almost 7000 issues, this brings the running time of mix credo from 26 seconds to 10 seconds.

Obviously there's more room for improvement, but I think this gain is already significant, and the change is simple enough to be merged on its own. Time-permitting I'll investigate further, but I can't make any promises.

@sasa1977
Copy link
Contributor Author

sasa1977 commented Dec 6, 2023

Hey, it's been a while since I've created this PR, so I'm pinging to check if could I get some feedback on this?

@rrrene rrrene merged commit 5aa5a58 into rrrene:master Dec 6, 2023
9 of 10 checks passed
@rrrene
Copy link
Owner

rrrene commented Dec 6, 2023

@sasa1977 Crap, I remember looking at this and being excited to merge this ... sorry I missed this, it looks great!

Will publish an RC with some other patches shortly 👍

@rrrene
Copy link
Owner

rrrene commented Dec 7, 2023

@sasa1977 This is published as part of v1.7.2-rc.2.

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