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

[Project Goal, Help Wanted] Optimizing MSRV attribute collection #13169

Open
blyxyas opened this issue Jul 26, 2024 · 2 comments · May be fixed by #13821
Open

[Project Goal, Help Wanted] Optimizing MSRV attribute collection #13169

blyxyas opened this issue Jul 26, 2024 · 2 comments · May be fixed by #13821
Labels
E-medium Call for participation: Medium difficulty level problem and requires some initial experience. performance-project For issues and PRs related to the Clippy Performance Project

Comments

@blyxyas
Copy link
Member

blyxyas commented Jul 26, 2024

Currently, when knowing if the MSRV is high enough to run a lint, we're doing lots of repeated work.
We visit the same attributes a lot of times with the extract_msrv_attr! (specifically, the number of lints that use MSRVs, so a good number of dozens).

A possible solution to this would be precomputing the MSRV by DefId, as there can be more than a single clippy::msrv attribute on a single module.

Additional resources:

@blyxyas blyxyas added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. performance-project For issues and PRs related to the Clippy Performance Project E-help-wanted Call for participation: Help is requested to fix this issue. labels Jul 26, 2024
@Alexendoo
Copy link
Member

MSRV tracking will have to change anyway for incremental lints - they're run separately for each module so the current extraction mechanism wouldn't work

Since I'll be changing it for that I can take a look at reducing the amount of attribute parsing going on too

Early lints will probably stay the same for now at least

@Alexendoo Alexendoo removed the E-help-wanted Call for participation: Help is requested to fix this issue. label Jul 27, 2024
@Alexendoo
Copy link
Member

Gonna remove help wanted until ^ is done, I'll make that the first thing I do though if someone wants to look at it further after that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-medium Call for participation: Medium difficulty level problem and requires some initial experience. performance-project For issues and PRs related to the Clippy Performance Project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants