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 <djsmits12@gmail.com>

This discussion has originally started in #35444

Release Notes:

- Improved project search speed.

Co-authored-by: Remco <djsmits12@gmail.com>
This commit is contained in:
Piotr Osiewicz 2025-08-04 18:25:42 +02:00 committed by GitHub
parent 65018c28c0
commit bf361c316d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()?;
}