ashb opened a new pull request, #24284:
URL: https://github.com/apache/airflow/pull/24284

   These changes make the endpoint go from almost 20s down to 1.5s and the
   changes are two fold:
   
   1. Keep datetimes as objects for as long as possible
   
      Previously we were converting start/end dates for a task group to a
      string, and then in the parent parsing it back to a datetime to find
      the min and max of all the child nodes.
   
      The fix for that was to leave it as a datetime (or a
      pendulum.DateTime technically) and use the existing
      `AirflowJsonEncoder` class to "correctly" encode these objects on
      output.
   
   2. Reduce the number of DB queries from 1 per task to 1.
   
      The removed `get_task_summaries` function was called for each task,
      and was making a query to the database to find info for the given
      DagRuns.
   
      The helper function now makes just a single DB query for all
      tasks/runs and constructs a dict to efficiently look up the ti by
      run_id.


-- 
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]

Reply via email to