-
-
Notifications
You must be signed in to change notification settings - Fork 713
perf(language_server): avoid creating HashMap in Backend::did_change_watched_files
#14735
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
perf(language_server): avoid creating HashMap in Backend::did_change_watched_files
#14735
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
5279f46 to
ebd1d74
Compare
aa9e30f to
14de671
Compare
ebd1d74 to
8ad2256
Compare
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.
Pull Request Overview
This PR optimizes the Backend::did_change_watched_files method by replacing an inefficient HashMap-based approach with a more direct Vec-based collection for storing diagnostics, reducing unnecessary allocations and improving performance.
- Replaced
papaya::HashMapwithVecfor collecting diagnostics - Simplified the logic flow by removing intermediate HashMap operations
- Eliminated redundant cloning and collection operations
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Backend::did_change_watched_filesBackend::did_change_watched_files
Merge activity
|
…_watched_files` (#14735) The URI is only valid for one worker, so use a `Vec` to avoid transforming into a `Vec` later.
8ad2256 to
ed922ec
Compare

The URI is only valid for one worker, so use a
Vecto avoid transforming into aVeclater.