Skip to content

fix: Don't enable the search fast path for short associated functions when a search scope is set #17955

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

Merged
merged 1 commit into from
Aug 25, 2024

Conversation

ChayimFriedman2
Copy link
Contributor

In most places where we set a search scope it is a single file, and so the fast path will actually harm performance, since it has to search for aliases in the whole project. The only exception that qualifies for the fast path is SSR (there is an exception that don't qualify for the fast path as it search for use items). It sets the search scope to avoid dependencies. We could make it use the fast path, but I didn't bother.

I forgot this while working on #17927.

… a search scope is set

In most places where we set a search scope it is a single file, and so the fast path will actually harm performance, since it has to search for aliases in the whole project.
The only exception that qualifies for the fast path is SSR (there is an exception that don't qualify for the fast path as it search for `use` items). It sets the search scope to avoid dependencies. We could make it use the fast path, but I didn't bother.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 25, 2024
@ChayimFriedman2 ChayimFriedman2 changed the title Don't enable the search fast path for short associated functions when a search scope is set fix: Don't enable the search fast path for short associated functions when a search scope is set Aug 25, 2024
@Veykril
Copy link
Member

Veykril commented Aug 25, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Aug 25, 2024

📌 Commit b982783 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Aug 25, 2024

⌛ Testing commit b982783 with merge 1271dff...

@bors
Copy link
Contributor

bors commented Aug 25, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 1271dff to master...

@bors bors merged commit 1271dff into rust-lang:master Aug 25, 2024
11 checks passed
@ChayimFriedman2 ChayimFriedman2 deleted the fix-fast-search-with-scope branch October 16, 2024 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants