Add virtualization to grid view#60241
Merged
bbovenzi merged 6 commits intoapache:mainfrom Jan 8, 2026
Merged
Conversation
bbovenzi
commented
Jan 7, 2026
Closed
2 tasks
kaxil
reviewed
Jan 8, 2026
airflow-core/src/airflow/ui/src/layouts/Details/Grid/VirtualizationContext.tsx
Outdated
Show resolved
Hide resolved
kaxil
approved these changes
Jan 8, 2026
Member
|
@bbovenzi, Im seeing for large dags the grid view task alignment is broken in this PR
here's my dag """
DAG for testing Grid View performance with 5000 tasks.
This DAG creates a complex structure with:
- 50 top-level task groups
- Each group contains 100 tasks organized in 10 sub-groups
- Mix of sequential and parallel dependencies
- Total: 5000 EmptyOperator tasks
"""
from airflow.sdk import DAG
from airflow.sdk.definitions.taskgroup import TaskGroup
from airflow.operators.empty import EmptyOperator
from datetime import datetime
with DAG(
dag_id="grid_view_performance_test_5000_tasks",
start_date=datetime(2025, 1, 1),
schedule=None,
catchup=False,
tags=["performance", "test", "grid_view"],
description="Complex DAG with 5000 tasks to test grid view performance",
) as dag:
# Entry point task
start = EmptyOperator(task_id="start")
# Exit point task
end = EmptyOperator(task_id="end")
previous_group_final_tasks = [start]
# Create 50 main task groups
for main_group_idx in range(50):
with TaskGroup(group_id=f"main_group_{main_group_idx}") as main_group:
# Entry task for this main group
group_start = EmptyOperator(task_id="group_start")
# Exit task for this main group
group_end = EmptyOperator(task_id="group_end")
sub_group_final_tasks = []
# Create 10 sub-groups within each main group
for sub_group_idx in range(10):
with TaskGroup(group_id=f"sub_group_{sub_group_idx}") as sub_group:
# Create 10 tasks per sub-group (10 sub-groups * 10 tasks = 100 tasks per main group)
sub_tasks = []
for task_idx in range(10):
task = EmptyOperator(task_id=f"task_{task_idx}")
sub_tasks.append(task)
# Create dependencies within sub-group
# First 5 tasks run in parallel, then next 5 tasks depend on them
for i in range(5, 10):
sub_tasks[i - 5] >> sub_tasks[i]
# Last task of sub-group
sub_group_final = sub_tasks[-1]
# Connect group_start to each sub-group's first tasks
group_start >> sub_tasks[0]
group_start >> sub_tasks[1]
# Collect final tasks from each sub-group
sub_group_final_tasks.append(sub_group_final)
# Connect all sub-group final tasks to group_end
sub_group_final_tasks >> group_end
# Connect previous groups to current group
# Create some inter-group dependencies for complexity
if main_group_idx % 5 == 0:
# Every 5th group depends on all previous group tasks
previous_group_final_tasks >> group_start
else:
# Other groups depend on the immediately previous group
previous_group_final_tasks[-1] >> group_start
# Track this group's final task
previous_group_final_tasks.append(group_end)
# Connect all final group tasks to the end task
previous_group_final_tasks >> end |
Contributor
Author
Thanks. What OS+browser are you on? |
pierrejeambrun
approved these changes
Jan 8, 2026
airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx
Outdated
Show resolved
Hide resolved
….tsx Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
Member
chrome with airflow running on ubuntu (wsl) via breeze |
Contributor
Author
|
@dheerajturaga Fixed
|
Merged
Member
|
Thanks @bbovenzi , for implementing this! Very Cool! this is definitely a very big improvement (I'm seeing 4x improvement 8s -> 2s) |
dheerajturaga
approved these changes
Jan 8, 2026
github-actions bot
pushed a commit
that referenced
this pull request
Jan 8, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com> * Fix scrollbars and horizontal scrolling --------- (cherry picked from commit 7a64304) Co-authored-by: Brent Bovenzi <brent@astronomer.io> Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
Member
|
#protm |
bbovenzi
added a commit
that referenced
this pull request
Jan 8, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx * Fix scrollbars and horizontal scrolling --------- (cherry picked from commit 7a64304) Co-authored-by: Brent Bovenzi <brent@astronomer.io> Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
Member
|
Wow Coool!😲 |
stegololz
pushed a commit
to stegololz/airflow
that referenced
this pull request
Jan 9, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com> * Fix scrollbars and horizontal scrolling --------- Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
ephraimbuddy
pushed a commit
that referenced
this pull request
Jan 13, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx * Fix scrollbars and horizontal scrolling --------- (cherry picked from commit 7a64304) Co-authored-by: Brent Bovenzi <brent@astronomer.io> Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
ephraimbuddy
pushed a commit
that referenced
this pull request
Jan 14, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx * Fix scrollbars and horizontal scrolling --------- (cherry picked from commit 7a64304) Co-authored-by: Brent Bovenzi <brent@astronomer.io> Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
ephraimbuddy
pushed a commit
that referenced
this pull request
Jan 16, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx * Fix scrollbars and horizontal scrolling --------- (cherry picked from commit 7a64304) Co-authored-by: Brent Bovenzi <brent@astronomer.io> Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
1 task
jhgoebbert
pushed a commit
to jhgoebbert/airflow_Owen-CH-Leung
that referenced
this pull request
Feb 8, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com> * Fix scrollbars and horizontal scrolling --------- Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
Subham-KRLX
pushed a commit
to Subham-KRLX/airflow
that referenced
this pull request
Mar 4, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com> * Fix scrollbars and horizontal scrolling --------- Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
Ankurdeewan
pushed a commit
to Ankurdeewan/airflow
that referenced
this pull request
Mar 15, 2026
* Add virtualization to grid view * Remove all jsx inline function declarations * Remove awkward Bar code reuse, add nav mode const * Remove extraneous code * Update airflow-core/src/airflow/ui/src/layouts/Details/Grid/TaskNames.tsx Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com> * Fix scrollbars and horizontal scrolling --------- Co-authored-by: Pierre Jeambrun <pierrejbrun@gmail.com>
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.




Virtualize the grid view to improve rendering performance on very large dags.
Before (10 dag runs with 1000 tasks):

After (10 dag runs with 1000 tasks):

Results go from unusable to slow. I'll look for other improvements in follow up PRs. Notably some of the API calls still take 1-3 seconds.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.