[v3-3-test] Stop re-rendering the whole Grid on every hover - #69928
Merged
Conversation
Every cell in the Dag Grid view subscribed to a shared hover context, so hovering any cell changed the context value and re-rendered the entire grid. On a ~20-run x 20-task grid that measured ~3 React commits plus full-grid render work per hover — the interaction lag reported in the issue, which only gets worse as the Dag grows. Move the run-column / task-row crosshair highlight to a single delegated pointerover handler that toggles CSS classes on the matching cells by data-run-id / data-task-id, so hovering does no React render work at all. The same delegated root covers the gantt so the shared row highlight stays in sync. Measured on the same grid, React commits per hover dropped from ~3.0 to ~0.07. related: apache#69531 (cherry picked from commit ae6188d)
pierrejeambrun
requested review from
bbovenzi,
choo121600,
guan404ming,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
July 15, 2026 14:49
bbovenzi
approved these changes
Jul 15, 2026
Contributor
|
Hi maintainer, this PR was merged without a milestone set.
|
vatsrahul1001
pushed a commit
that referenced
this pull request
Aug 5, 2026
Every cell in the Dag Grid view subscribed to a shared hover context, so hovering any cell changed the context value and re-rendered the entire grid. On a ~20-run x 20-task grid that measured ~3 React commits plus full-grid render work per hover — the interaction lag reported in the issue, which only gets worse as the Dag grows. Move the run-column / task-row crosshair highlight to a single delegated pointerover handler that toggles CSS classes on the matching cells by data-run-id / data-task-id, so hovering does no React render work at all. The same delegated root covers the gantt so the shared row highlight stays in sync. Measured on the same grid, React commits per hover dropped from ~3.0 to ~0.07. related: #69531 (cherry picked from commit ae6188d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #69912 to
v3-3-test.Cherry-picked from ae6188d.
Two files needed manual conflict resolution due to drift on
v3-3-test; in both cases I kept thev3-3-teststructure and applied only this PR's hover change:DetailsLayout.tsx—v3-3-testhas a different collapse/resize details-panel layout. Kept that layout and applied only the hover wiring: dropHoverProvider/useHover, adduseGridCrosshairHover(gridHoverRootRef), attachref={gridHoverRootRef}to the grid/gantt container, and simplifySharedScrollBox.GridTI.tsx— main has ahasNoteprop that isn't onv3-3-test; that prop was excluded. Applied only the hover change (removeuseHover/handlers, adddata-run-id/data-selected/data-task-id, drop the hovered background branch).Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines