search: New old search implementation (#39956)

This is an in-progress work on changing how task scheduler affects
performance of project search. Instead of relying on tasks being
executed at a discretion of the task scheduler, we want to experiment
with having a set of "agents" that prioritize driving in-progress
project search matches to completion over pushing the whole thing to
completion. This should hopefully significantly improve throughput &
latency of project search.

Release Notes:

- Improved project search performance

---------

Co-authored-by: Smit Barmase <smit@zed.dev>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
This commit is contained in:
Piotr Osiewicz
2025-10-20 16:40:02 +02:00
committed by GitHub
co-authored by Smit Barmase Smit Barmase
parent 85c2aa7325
commit 7c4fb5a899
11 changed files with 1023 additions and 389 deletions
+9 -3
View File
@@ -639,9 +639,15 @@ impl HeadlessProject {
PathStyle::local(),
)?;
let results = this.update(&mut cx, |this, cx| {
this.buffer_store.update(cx, |buffer_store, cx| {
buffer_store.find_search_candidates(&query, message.limit as _, this.fs.clone(), cx)
})
project::Search::local(
this.fs.clone(),
this.buffer_store.clone(),
this.worktree_store.clone(),
message.limit as _,
cx,
)
.into_handle(query, cx)
.matching_buffers(cx)
})?;
let mut response = proto::FindSearchCandidatesResponse {