guan404ming commented on code in PR #54823:
URL: https://github.com/apache/airflow/pull/54823#discussion_r2293719146
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py:
##########
@@ -217,16 +218,7 @@ def get_grid_runs(
) -> list[GridRunsResponse]:
"""Get info about a run for the grid."""
# Retrieve, sort the previous DAG Runs
- base_query = select(
- DagRun.dag_id,
- DagRun.run_id,
- DagRun.queued_at,
- DagRun.start_date,
- DagRun.end_date,
- DagRun.run_after,
- DagRun.state,
- DagRun.run_type,
- ).where(DagRun.dag_id == dag_id)
+ base_query =
select(DagRun).options(joinedload(DagRun.dag_model)).where(DagRun.dag_id ==
dag_id)
Review Comment:
Based on my test on my local machine, it does increase the load time 0.1s in
average. Not sure if this is ok in here.
**before** (avg 3.95s in 10 time tests)
<img width="1440" height="900" alt="Screenshot 2025-08-22 at 9 13 02 PM"
src="https://github.com/user-attachments/assets/c631e4d4-3bbf-4496-8120-542cd0e2f6eb"
/>
**after** (avg 4.05 in 10 time tests)
<img width="1435" height="897" alt="Screenshot 2025-08-22 at 9 07 46 PM"
src="https://github.com/user-attachments/assets/e3bf490b-c644-4a2e-9109-20580131b772"
/>
--
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]