mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
perf: defer terminal menu pane lookups (#3946)
This commit is contained in:
@@ -272,8 +272,11 @@ export function useTerminalPaneContextMenu({
|
||||
setOpen(true)
|
||||
}
|
||||
|
||||
const paneCount = managerRef.current?.getPanes().length ?? 1
|
||||
const menuPaneId = resolveMenuPane()?.id ?? null
|
||||
// Why: PaneManager.getPanes() allocates public pane wrappers. Closed menus
|
||||
// do not need pane counts or target identity, so avoid that work on every
|
||||
// render across hundreds of mounted terminal tabs.
|
||||
const paneCount = open ? (managerRef.current?.getPanes().length ?? 1) : 1
|
||||
const menuPaneId = open ? (resolveMenuPane()?.id ?? null) : null
|
||||
|
||||
return {
|
||||
open,
|
||||
|
||||
Reference in New Issue
Block a user