2026.3.13 - UI freezes 4-5 s when selecting a large folder (O(n*m) in ExpandConnectionsForCheckoutSelection)
Environment:
Problem:
Selecting this folder in the navigation tree freezes the UI thread for 4-5 s (one CPU core at 100 %). Selecting a sibling folder with few subfolders, or the vault root, is instant. Dashboard tab, documentation and folder names have no effect. Disabling "Enable entry states (locked, running, checked out)" does not help.
Profiling (dotnet-trace, UI thread, 2 clicks = 9.4 s):
TreeDataGrid.OnPointerPressed
> FrmMainDocumentManager.LoadConnectionDetailsInControl
> FrmMainDocumentManager.SetControlStates
> ConnectionControlStates..ctor
> BaseConnectionControlStates.SetCheckoutInfo (9.0 s)
> BaseConnectionControlStates.ExpandConnectionsForCheckoutSelection
> <ExpandConnectionsForCheckoutSelection>g__TryAdd|181_0
> InternalConnectionList.FindConnectionsInGroup(string) (9.0 s)
> Enumerable.Where(...).ToArray() (SpanHelpers.SequenceEqual)
FindConnectionsInGroup appears to do a linear scan over all entries for every subfolder in the selection, i.e. O(folders x entries), on the UI thread.
Expected:
Folder selection should not recursively expand the whole subtree for checkout state (or use an indexed lookup / run it off the UI thread).
The trace file (rdm.nettrace, zipped) is attached.
rdm.nettrace.zip