Early return from LintPass registration when collecting metadata#7253
Merged
bors merged 1 commit intorust-lang:masterfrom May 20, 2021
Merged
Early return from LintPass registration when collecting metadata#7253bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
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.
flip1995
commented
May 20, 2021
| { | ||
| 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; |
Member
Author
There was a problem hiding this comment.
This line is the only actual change in this PR.
Everything else is just moving the register_*_pass calls below the group registration.
Contributor
|
LGTM! This change sped up the collection on my machine about 2x as well. @bors r+ |
Contributor
|
@xFrednet: 🔑 Insufficient privileges: Not in reviewers |
Contributor
|
Well, @flip1995 could you merge the PR with |
Member
Author
|
@bors r=xFrednet |
Contributor
|
📌 Commit 7304829 has been approved by |
Contributor
23 tasks
Contributor
|
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
This was referenced May 20, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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