Stop re-rendering the whole Grid on every hover - #69912
Merged
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
1 task
pierrejeambrun
marked this pull request as ready for review
July 15, 2026 12:11
pierrejeambrun
requested review from
bbovenzi,
choo121600,
guan404ming,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
July 15, 2026 12:11
Member
Author
BeforeScreen.Recording.2026-07-15.at.15.00.47.movAfterScreen.Recording.2026-07-15.at.15.02.05.mov |
bbovenzi
approved these changes
Jul 15, 2026
bbovenzi
left a comment
Contributor
There was a problem hiding this comment.
Great! Yes, we should've done the hovering in css a while ago. Thanks
Contributor
Backport failed to create: v3-3-test. View the failure log Run detailsNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
You can attempt to backport this manually by running: cherry_picker ae6188d v3-3-testThis should apply the commit to the v3-3-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continueIf you don't have cherry-picker installed, see the installation guide. |
1 task
bbovenzi
pushed a commit
that referenced
this pull request
Jul 15, 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)
joshuabvarghese
pushed a commit
to joshuabvarghese/airflow
that referenced
this pull request
Jul 16, 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: apache#69531
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.
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 — the interaction lag reported in #69531, which worsens as the Dag grows. This moves the run-column / task-row crosshair highlight to a single delegated
pointeroverhandler that toggles CSS classes on the matching cells bydata-run-id/data-task-id, so hovering does no React render work; the same delegated root covers the gantt so the shared row highlight stays in sync.Measured on a ~20-run × 20-task grid (React Profiler): commits per hover dropped from ~3.0 to ~0.07 — hovering now does essentially zero React work. Appearance is unchanged (same crosshair highlight; selected cells still win).
The separate stream-driven full-grid re-render (the other cause of grid slowness in #69531) is addressed in a stacked follow-up on top of this branch.
related: #69531
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.8) following the guidelines