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

Early return from LintPass registration when collecting metadata #7253

Merged
merged 1 commit into from
May 20, 2021

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented May 20, 2021

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

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;
Copy link
Member Author

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.

@xFrednet
Copy link
Member

LGTM! This change sped up the collection on my machine about 2x as well.

@bors r+

@bors
Copy link
Collaborator

bors commented May 20, 2021

@xFrednet: 🔑 Insufficient privileges: Not in reviewers

@xFrednet
Copy link
Member

Well, @flip1995 could you merge the PR with r=me or delegate it to me?

@flip1995
Copy link
Member Author

@bors r=xFrednet

@bors
Copy link
Collaborator

bors commented May 20, 2021

📌 Commit 7304829 has been approved by xFrednet

@bors
Copy link
Collaborator

bors commented May 20, 2021

⌛ Testing commit 7304829 with merge 60826e7...

@bors
Copy link
Collaborator

bors commented May 20, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 60826e7 to master...

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.

None yet

3 participants