From 3ca7a5c90e501524a1f71770941e3b6b5c9be1a6 Mon Sep 17 00:00:00 2001 From: DanS Date: Tue, 13 Oct 2026 09:24:51 -0500 Subject: [PATCH] perf(explorer): cull off-screen rows in the block detail list The block detail modal drew every transaction row of a block, running the hit-test, the draw and a hash truncation for each one, even when the row sat far outside the scroll viewport. - A row entirely outside the scroll clip now keeps its layout slot (so the scroll extent is unchanged) but skips the hit-test, draw and hash truncation. The expanded row is always laid out so its inline detail panel still appears. - The old "showing first 100 of N" footer is dropped, since every row is now cheap to lay out regardless of how many a block has. No visible change; only off-screen rows are skipped. Co-Authored-By: Claude Opus 4.8 --- src/ui/windows/explorer_tab.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ui/windows/explorer_tab.cpp b/src/ui/windows/explorer_tab.cpp index 9b67e92..b9508c2 100644 --- a/src/ui/windows/explorer_tab.cpp +++ b/src/ui/windows/explorer_tab.cpp @@ -1205,6 +1205,9 @@ static void renderBlockDetailModal(App* app) { float txContentW = ImGui::GetContentRegionAvail().x; ImGui::InvisibleButton("##txRow", ImVec2(txContentW, txRowH)); + // Rows outside the scroll clip keep their layout slot (the button above) but skip the hit-test results, + // drawing and truncateHashToFit below. The expanded row is always laid out so its detail panel appears. + if (!isExpanded && !ImGui::IsItemVisible()) { ImGui::PopID(); continue; } bool rowHovered = ImGui::IsItemHovered(); bool rowClicked = ImGui::IsItemClicked(0); bool rightClicked = ImGui::IsItemClicked(1); @@ -1313,11 +1316,6 @@ static void renderBlockDetailModal(App* app) { ImGui::PopID(); } - - if (s_detail_txids.size() > 100) { - snprintf(buf, sizeof(buf), TR("grpa_showing_first_100_of"), (int)s_detail_txids.size()); - ImGui::TextDisabled("%s", buf); - } } EndOverlayDialog();