Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix performance issues in project search related to detecting JSX tag auto-closing (#30842)
Remco Smitsa8241193676a
diff --git a/crates/editor/src/jsx_tag_auto_close.rs b/crates/editor/src/jsx_tag_auto_close.rsindex 3a181f8e325..e669a595131 100644--- a/crates/editor/src/jsx_tag_auto_close.rs+++ b/crates/editor/src/jsx_tag_auto_close.rs@@ -316,6 +316,10 @@ pub(crate) fn refresh_enabled_in_any_buffer(let multi_buffer = multi_buffer.read(cx);let mut found_enabled = false;multi_buffer.for_each_buffer(|buffer| {+ if found_enabled {+ return;+ }+let buffer = buffer.read(cx);let snapshot = buffer.snapshot();for syntax_layer in snapshot.syntax_layers() {