-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Early return from LintPass registration when collecting metadata #7253
Conversation
This speeds up the metadata collection by 2-2.5x on my machine. During metadata collection other lint passes don't have to be registered, only the lints themselves.
{ | ||
if std::env::var("ENABLE_METADATA_COLLECTION").eq(&Ok("1".to_string())) { | ||
store.register_late_pass(|| box utils::internal_lints::metadata_collector::MetadataCollector::new()); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is the only actual change in this PR.
Everything else is just moving the register_*_pass
calls below the group registration.
LGTM! This change sped up the collection on my machine about 2x as well. @bors r+ |
@xFrednet: 🔑 Insufficient privileges: Not in reviewers |
Well, @flip1995 could you merge the PR with |
@bors r=xFrednet |
📌 Commit 7304829 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This speeds up the metadata collection by 2-2.5x on my machine. During
metadata collection other lint passes don't have to be registered, only
the lints themselves.
cc #7172
r? @xFrednet
changelog: none