-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
Two AppKit view controllers create brand new cell views on every reload instead of using the standard makeView(withIdentifier:owner:) cell reuse pattern:
SidebarOutlineViewController (710 lines)
makeProjectCell,makeWorktreeCell,makeAgentCell(lines 272-397) create freshNSTableCellView+NSStackViewinstances every timeoutlineView(_:viewFor:item:)is calledrebuildNodesis called fromupdateNSViewControllerwhich fires on every SwiftUI state change, creating allocation pressure
CommandPaletteViewController (~640 lines)
tableView(_:viewFor:row:)(lines 667-717) creates new cells every callfilterVariantscallsreloadData()on every keystroke, so typing creates new views for every filtered result on every character
Impact
Without cell reuse:
- Scrolling or frequent reloads allocate and discard many views
- GC pressure increases with more items
- Performance degrades with larger lists
Suggested approach
- Register cell identifiers for each cell type
- Use
makeView(withIdentifier:owner:)to reuse cells - Configure the reused cell's content instead of rebuilding the view hierarchy
Files
apps/purepoint-macos/purepoint-macos/Views/Sidebar/SidebarOutlineViewController.swiftapps/purepoint-macos/purepoint-macos/Views/CommandPalette/CommandPalettePanel.swift
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request