From 29335bd38981675399c86b74a230dfe5bc8eb954 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Wed, 31 Aug 2022 00:08:21 -0400 Subject: [PATCH] Debugger: Never automatically resize the columns of the ImageFunctions table. This table will have thousands of items in every branch, most with extremely long names, so resizing all its columns to the preferred size takes an unbelievable number of app_server round-trips to measure text. For modules with any significant usage of C++, there are going to be functions with names so long that it will make the table quite unwiedly to work with, anyway, when columns are automatically resized. This fixes half of the whole-application hang that happens when changing between functions in the call stack. --- .../user_interface/gui/team_window/ImageFunctionsView.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/team_window/ImageFunctionsView.cpp b/src/apps/debugger/user_interface/gui/team_window/ImageFunctionsView.cpp index ac6edbe46e..f293914875 100644 --- a/src/apps/debugger/user_interface/gui/team_window/ImageFunctionsView.cpp +++ b/src/apps/debugger/user_interface/gui/team_window/ImageFunctionsView.cpp @@ -707,9 +707,6 @@ ImageFunctionsView::SetImageDebugInfo(ImageDebugInfo* imageDebugInfo) fFunctionsTable->SetNodeExpanded(path, true, false); } - if (fImageDebugInfo != NULL) - fFunctionsTable->ResizeAllColumnsToPreferred(); - TRACE_GUI("ImageFunctionsView::SetImageDebugInfo(%p) done\n", imageDebugInfo); } @@ -725,7 +722,6 @@ ImageFunctionsView::SetFunction(FunctionInstance* function) fFunctionsTable->SetNodeExpanded(path, true, true); fFunctionsTable->SelectNode(path, false); fFunctionsTable->ScrollToNode(path); - fFunctionsTable->ResizeAllColumnsToPreferred(); } else fFunctionsTable->DeselectAllNodes(); } @@ -827,7 +823,7 @@ ImageFunctionsView::_Init() fFunctionsTable->SetSortingEnabled(false); float addressWidth = be_plain_font->StringWidth("0x00000000") - + be_control_look->DefaultLabelSpacing() * 2 + 5; + + be_control_look->DefaultLabelSpacing() * 3; // columns fFunctionsTable->AddColumn(fHighlightingColumn @@ -862,8 +858,6 @@ ImageFunctionsView::_ExpandFilteredNodes() fFunctionsTable->SetNodeExpanded(path, true, true); } } - - fFunctionsTable->ResizeAllColumnsToPreferred(); }