You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(grid): hoist secondary click (context menu) and tooltip handling from _GridCell to grid level #1346
In #983, primary pointer taps and cursor regions were successfully hoisted to grid-level hit-testing, significantly reducing per-cell overhead during scrolling and column-window shifts. However, as explicitly noted in #983 (comment) and #987, secondary-tap (right-click), ContextMenu (from shadcn_flutter), and material.Tooltip handling remained inside each visible _GridCell.
For a standard viewport with 30 visible rows and 20 visible columns (600 visible cells), this mounts:
600 material.Tooltip instances (each maintaining internal gesture and overlay timers)
This bloats the widget tree with ~4,200 widgets/render objects and retains a dependency on shadcn_flutter inside the hot grid rendering loop (related to Epic #1331).
Proposed Solution
Grid-level right click: Capture secondary pointer down events at the grid gesture layer (GridPointerSelection / grid hit test) and compute _cellAtOffset(offset) on demand.
On-demand ContextMenu: Only instantiate and display the context menu when a cell is actually right-clicked, instead of wrapping every visible cell in a ContextMenu.
Grid-level Tooltip / Cell Popover: Hoist truncated cell tooltip display to the grid level or trigger it via the existing _GridCellPopoverInspector mechanism.
Convert _GridCell to a pure, lightweight leaf widget (Container with padding, border, and Text).
Acceptance Criteria
_GridCell does not instantiate per-cell ContextMenu, Listener(onPointerDown), or Tooltip.
Right-clicking any cell continues to open the cell context menu at the click position.
Hovering over truncated cells continues to show tooltip / value inspection.
Frame build time during horizontal window shifts (grid_perf_bench.dart MODE=scroll) shows measurable reduction.
Activity
perf(grid): hoist secondary click (context menu) and tooltip handling…
ZhuchkaTriplesix commentedon Oct 11, 2026
Resolved and merged into dev via PR #1473.