Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Make search much faster (#62658)
Ali1e3d8b5a66af
diff --git a/crates/project/src/project_search.rs b/crates/project/src/project_search.rsindex 438b2201880..91c89d7c93d 100644--- a/crates/project/src/project_search.rs+++ b/crates/project/src/project_search.rs@@ -479,6 +479,7 @@ impl Search {}let tx = tx.clone();let results = results.clone();+ let snapshot = Arc::new(snapshot);cx.background_executor().spawn(async move {@@ -903,7 +904,7 @@ fn is_utf8_prefix(bytes: &[u8]) -> bool {struct InputPath {entry: Entry,- snapshot: Snapshot,+ snapshot: Arc<Snapshot>,should_scan_tx: oneshot::Sender<(ProjectPath, MatchPositionHint)>,}