Reduce amount of foreground tasks spawned on multibuffer/editor updates (#41479)
When doing a project wide search in zed on windows for `hang`, zed starts to freeze for a couple seconds ultimately starting to error with `Not enough quota is available to process this command.` when dispatching windows messages. The cause for this is that we simply overload the windows message pump due to the sheer amount of foreground tasks we spawn when we populate the project search. This PR is an attempt at reducing this. Release Notes: - Reduced hangs and stutters in large project file searches
This commit is contained in:
@@ -602,6 +602,7 @@ impl GitBlame {
|
||||
}
|
||||
|
||||
fn regenerate_on_edit(&mut self, cx: &mut Context<Self>) {
|
||||
// todo(lw): hot foreground spawn
|
||||
self.regenerate_on_edit_task = cx.spawn(async move |this, cx| {
|
||||
cx.background_executor()
|
||||
.timer(REGENERATE_ON_EDIT_DEBOUNCE_INTERVAL)
|
||||
|
||||
Reference in New Issue
Block a user