Skip to content

perf: skip disallowed-profile resolution when the crate has no profile attributes#17277

Closed
xmakro wants to merge 1 commit into
rust-lang:masterfrom
xmakro:perf/disallowed-profiles-empty-config
Closed

perf: skip disallowed-profile resolution when the crate has no profile attributes#17277
xmakro wants to merge 1 commit into
rust-lang:masterfrom
xmakro:perf/disallowed-profiles-empty-config

Conversation

@xmakro

@xmakro xmakro commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
crate instructions base instructions new delta
cargo-0.80.0 (lib) 29,893,340,215 29,749,599,369 -0.48%
cargo-0.80.0 (bin) 1,631,566,954 1,625,253,426 -0.39%
wasmi-0.35.0 16,145,953,750 16,081,279,936 -0.40%
serde-1.0.204 7,204,244,239 7,164,978,368 -0.55%
regex-1.10.5 1,010,415,035 1,007,474,624 -0.29%

changelog: none

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 19, 2026
@rustbot

rustbot commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

r? @samueltardieu

rustbot has assigned @samueltardieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: 8 candidates
  • 8 candidates expanded to 8 candidates
  • Random selection from Jarcho, dswij, llogiq, samueltardieu

…e attributes

The disallowed_methods and disallowed_types lints resolved active profiles
for every path, method call and type node, walking HIR parents and caching
one entry per visited HirId even though almost no crate uses
clippy::disallowed_profile attributes. Scan the crate's attribute maps once
on first use and skip resolution entirely when no such attribute exists.
@xmakro xmakro force-pushed the perf/disallowed-profiles-empty-config branch from 0776294 to be5b25d Compare June 19, 2026 21:38
@rustbot

rustbot commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (possibly #17251) made this pull request unmergeable. Please resolve the merge conflicts.

@Jarcho

Jarcho commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Closing since the PR adding this feature was reverted.

cc #17251 and #15779 so the optimization doesn't get forgotten.

@Jarcho Jarcho closed this Jun 23, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 23, 2026
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.

4 participants