From 325e6b9fef175b398b600a35cecc516a048cf6eb Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 24 Jul 2024 21:04:07 +0200 Subject: [PATCH] editor: Improve performance of buffer/project search (#15109) Fixes #15102 Release Notes: - Improved performance of project and buffer search when there are many matches. --- crates/editor/src/editor.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index b4215bd2241bc915ff5bd65b152afbd764e3ea1c..ce61a3f7d6744524c7c2347ac12488c3d6a99447 100644 --- a/crates/editor/src/editor.rs +++ b/crates/editor/src/editor.rs @@ -10859,17 +10859,6 @@ impl Editor { color_fetcher: fn(&ThemeColors) -> Hsla, cx: &mut ViewContext, ) { - let snapshot = self.snapshot(cx); - // this is to try and catch a panic sooner - for range in ranges { - snapshot - .buffer_snapshot - .summary_for_anchor::(&range.start); - snapshot - .buffer_snapshot - .summary_for_anchor::(&range.end); - } - self.background_highlights .insert(TypeId::of::(), (color_fetcher, Arc::from(ranges))); self.scrollbar_marker_state.dirty = true;