xvega opened a new pull request, #62369:
URL: https://github.com/apache/airflow/pull/62369
Add batch endpoint for grid TI summaries to reduce N+1 requests
The grid view fires one `GET /ui/grid/ti_summaries/{dag_id}/{run_id}`
request per DAG run column. For a DAG showing 25 runs this means 25 sequential
HTTP requests after the initial page load, which is the dominant cause of slow
grid load times for busy DAGs.
This PR adds a batch variant of that endpoint and updates the UI to use it:
- `GET /ui/grid/ti_summaries/{dag_id}?run_ids=id1&run_ids=id2&...` fetches
all runs in a single `WHERE run_id IN (...)` query and returns a
`run_summaries` array.
- `Grid.tsx` calls `useGridTiSummariesBatch` once after `useGridRuns`
resolves and passes the per-run result down to each `TaskInstancesColumn`.
- `TaskInstancesColumn` falls back to the individual per-run fetch when
`tiSummaries` is not provided, preserving existing behaviour.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]