From fe4c6d3527d45664c4daada5c57fdabf8d691f53 Mon Sep 17 00:00:00 2001 From: Haralil <16758443+Haralil@users.noreply.github.com> Date: Sat, 7 May 2022 00:51:15 +0500 Subject: [PATCH] Fix search taking too long with lots of entries * Placed FastEnsureVisible() into an if-case checking length of returned results. --- NbtStudio/UI/Windows/FindWindow.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NbtStudio/UI/Windows/FindWindow.cs b/NbtStudio/UI/Windows/FindWindow.cs index a617127..1b5eccf 100644 --- a/NbtStudio/UI/Windows/FindWindow.cs +++ b/NbtStudio/UI/Windows/FindWindow.cs @@ -115,7 +115,10 @@ private void StartActiveSearch(Func, List> fu var node = SearchingView.FindNode(item.Path, true); if (node is not null) { - FastEnsureVisible(node); + if (x.Result.Count() < 4000) + { + FastEnsureVisible(node); + } node.IsSelected = true; } }