Skip to content

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Oct 17, 2025

The URI is only valid for one worker, so use a Vec to avoid transforming into a Vec later.

@github-actions github-actions bot added A-editor Area - Editor and Language Server C-performance Category - Solution not expected to change functional behavior, only performance labels Oct 17, 2025
Copy link
Member Author

Sysix commented Oct 17, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@Sysix Sysix changed the base branch from 10-17-feat_language_server_send_in_memory_source_text_to_tsgolint_ to graphite-base/14735 October 17, 2025 18:56
@Sysix Sysix force-pushed the 10-17-perf_language_server_avoid_greating_hashmap_in_backend_did_change_watched_files_ branch from 5279f46 to ebd1d74 Compare October 17, 2025 18:57
@Sysix Sysix force-pushed the graphite-base/14735 branch from aa9e30f to 14de671 Compare October 17, 2025 18:57
@Sysix Sysix changed the base branch from graphite-base/14735 to main October 17, 2025 18:57
@Sysix Sysix force-pushed the 10-17-perf_language_server_avoid_greating_hashmap_in_backend_did_change_watched_files_ branch from ebd1d74 to 8ad2256 Compare October 17, 2025 19:15
@Sysix Sysix marked this pull request as ready for review October 17, 2025 19:21
Copilot AI review requested due to automatic review settings October 17, 2025 19:21
@Sysix Sysix requested a review from camc314 as a code owner October 17, 2025 19:21
Copy link
Contributor

Copilot AI left a 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::HashMap with Vec for 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.

@Sysix Sysix changed the title perf(language_server): avoid greating HashMap in Backend::did_change_watched_files perf(language_server): avoid creating HashMap in Backend::did_change_watched_files Oct 17, 2025
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Oct 17, 2025
Copy link
Contributor

camc314 commented Oct 17, 2025

Merge activity

…_watched_files` (#14735)

The URI is only valid for one worker, so use a `Vec` to avoid transforming into a `Vec` later.
@graphite-app graphite-app bot force-pushed the 10-17-perf_language_server_avoid_greating_hashmap_in_backend_did_change_watched_files_ branch from 8ad2256 to ed922ec Compare October 17, 2025 19:50
@graphite-app graphite-app bot merged commit ed922ec into main Oct 17, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 10-17-perf_language_server_avoid_greating_hashmap_in_backend_did_change_watched_files_ branch October 17, 2025 19:53
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-editor Area - Editor and Language Server C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants