zed/crates
Max Brunsfeld 7ae5ee699f
Debounce code action and document highlight requests (#2905)
Lately, I've been finding Rust-analyzer unusably slow when editing large
files (like `editor_tests.rs`, or `integration_tests.rs`). When I
profile the Rust-analyzer process, I see that it sometimes saturates up
to 10 cores processing a queue of code actions requests.

Additionally, sometimes when collaborating on large files like these, we
see long delays in propagating buffer operations. I'm still not sure why
this is happening, but whenever I look at the server logs in Datadog, I
see that there are remote `CodeActions` and `DocumentHighlights`
messages being processed that take upwards of 30 seconds. I think what
may be happening is that many such requests are resolving at once, and
the responses are taking up too much of the host's bandwidth.

I think that both of these problems are caused by us sending way too
many code action and document highlight requests to rust-analyzer. This
PR adds a simple debounce between changing selections and making these
requests.

From my local testing, this debounce makes Rust-analyzer *much* more
responsive when moving the cursor around a large file like
`editor_tests.rs`.
2023-08-29 09:30:36 -07:00
..
activity_indicator Add components example 2023-08-15 03:06:43 -07:00
ai language: Make Buffer::new take an explicit ID (#2900) 2023-08-28 11:51:50 +02:00
audio chore: remove unused features from rodio crate. (#2869) 2023-08-21 11:07:31 +02:00
auto_update Add components example 2023-08-15 03:06:43 -07:00
breadcrumbs Add components example 2023-08-15 03:06:43 -07:00
call Format let-else statements 2023-08-25 10:11:32 -07:00
channel Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
cli Prevent duplicate instances by coordinating via a socket 2023-07-07 14:19:44 -04:00
client Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
clock
collab Update some tests to reflect code action debouncing 2023-08-28 17:45:32 -07:00
collab_ui Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
collections
command_palette Move more window methods off AsyncAppContext 2023-08-08 11:38:07 -06:00
component_test Merge branch 'main' into disclosable-component 2023-08-23 16:30:27 -07:00
context_menu Add components example 2023-08-15 03:06:43 -07:00
copilot language: Make Buffer::new take an explicit ID (#2900) 2023-08-28 11:51:50 +02:00
copilot_button Add components example 2023-08-15 03:06:43 -07:00
db Simplify db tests 2023-07-14 16:09:02 -07:00
diagnostics Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
drag_and_drop Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
editor Update some tests to reflect code action debouncing 2023-08-28 17:45:32 -07:00
feature_flags Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
feedback Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
file_finder Store an AnyWindowHandle in WindowContext 2023-08-08 11:08:37 -06:00
fs Fix pathspec in staged_statuses 2023-07-23 21:36:29 -07:00
fsevent
fuzzy
git
go_to_line Store an AnyWindowHandle in WindowContext 2023-08-08 11:08:37 -06:00
gpui Format let-else statements 2023-08-25 10:11:32 -07:00
gpui_macros Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
install_cli Remove potential osascript hijacking 2023-08-18 17:40:08 -07:00
journal
language language: Make Buffer::new take an explicit ID (#2900) 2023-08-28 11:51:50 +02:00
language_selector Add components example 2023-08-15 03:06:43 -07:00
language_tools language: Make Buffer::new take an explicit ID (#2900) 2023-08-28 11:51:50 +02:00
live_kit_client Put LiveKitBridge Swift build directory in target 2023-07-28 18:53:24 -04:00
live_kit_server
lsp Use proper property names for inlay hint resolve capabilities 2023-08-28 00:27:59 +03:00
media
menu Position and style the channel editor correctly 2023-08-08 14:06:29 -07:00
node_runtime Reattempt Node installation if the installation itself errors 2023-07-28 15:24:40 -04:00
outline feat(workspace): allow alternative actions to open files and symbols in split 2023-07-14 21:49:15 +02:00
picker Merge branch 'main' into collab-panel 2023-08-15 03:25:45 -07:00
plugin
plugin_macros
plugin_runtime
project language: Make Buffer::new take an explicit ID (#2900) 2023-08-28 11:51:50 +02:00
project_panel Merge branch 'main' into divs 2023-08-22 16:35:56 -06:00
project_symbols Remove TestAppContext::add_view 2023-08-07 22:46:48 -06:00
quick_action_bar Format let-else statements 2023-08-25 10:11:32 -07:00
recent_projects WIP 2023-08-10 10:26:48 -06:00
refineable Mark new crates as publish = false 2023-08-22 20:47:05 -06:00
rope
rpc Demote some Peer logging to trace level 2023-08-28 17:45:19 -07:00
search language: Make Buffer::new take an explicit ID (#2900) 2023-08-28 11:51:50 +02:00
semantic_index Format let-else statements 2023-08-25 10:11:32 -07:00
settings Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
snippet
sqlez
sqlez_macros
sum_tree Ensure collaborators cursor colors are the same in channel buffers as in projects 2023-08-24 11:31:41 -07:00
terminal Trim off surrounding [] when parsing terminal hover links 2023-08-29 10:40:20 +03:00
terminal_view WIP 2023-08-25 15:06:31 -04:00
text Snapshot channel notes buffers when everyone leaves 2023-08-23 18:37:01 -07:00
theme Ensure collaborators cursor colors are the same in channel buffers as in projects 2023-08-24 11:31:41 -07:00
theme_selector Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
util Fix code that identifies language via extension 2023-08-08 21:35:11 -04:00
vcs_menu Format let-else statements 2023-08-25 10:11:32 -07:00
vim Fix zed-industries/community#1950 2023-08-25 11:34:07 -06:00
welcome WIP 2023-08-10 10:26:48 -06:00
workspace Format let-else statements 2023-08-25 10:11:32 -07:00
xtask
zed Debounce code action and document highlight requests (#2905) 2023-08-29 09:30:36 -07:00
zed-actions