From bf361c316d43469a568d5a621eccf5de9b42b906 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 4 Aug 2025 18:25:42 +0200 Subject: [PATCH] search: Update results multi-buffer before search is finished (#35470) I'm not sure when we've lost that notify, but it's causing the time to first search result equal to the time to run the whole search, which is not great. Co-authored-by: Remco This discussion has originally started in #35444 Release Notes: - Improved project search speed. Co-authored-by: Remco --- crates/search/src/project_search.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/search/src/project_search.rs b/crates/search/src/project_search.rs index 3b9700c5f1..15c1099aec 100644 --- a/crates/search/src/project_search.rs +++ b/crates/search/src/project_search.rs @@ -355,8 +355,9 @@ impl ProjectSearch { while let Some(new_ranges) = new_ranges.next().await { project_search - .update(cx, |project_search, _| { + .update(cx, |project_search, cx| { project_search.match_ranges.extend(new_ranges); + cx.notify(); }) .ok()?; }