-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIRFLOW-6871] optimize tree view for large DAGs (#7492)
This change reduces page size by more than 10X and reduces page load time by 3-5X. As a result, the tree view can now load large DAGs that were causing 5XX error without the patch. List of optimizations applied to the view handler: * only seralize used task instance attributes to json instead of the whole ORM object * encode task instance attributes as array instead of dict * encode datetime in unix timestamp instead of iso formmat string * push task instance attribute construction into client side JS * remove redundant task instance attributes * simplify reduce_nodes() logic, remove unnecessary if statements * seralize JSON as string to be used with JSON.parse on the client side to speed up browser JS parse time * remove spaces in seralized JSON string to reduce payload size Co-Authored-By: QP Hou <[email protected]> (cherry-picked from c1c2d6a)
- Loading branch information
Showing
2 changed files
with
167 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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