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


   Spawning a whole new python process and then re-loading all of Airflow
   is expensive. All though this time fades to insignificance for long
   running tasks, this delay gives a "bad" experience for new users when
   they are just trying out Airflow for the first time.
   
   For the LocalExecutor this cuts the "queued time" down from 1.5s to 0.1s
   on average.
   
   Data on this for a simple 10-task sequential DAG:
   
   ```sql
   SELECT execution_date,
       min(start_date - queued_dttm) AS min_quued_delay,
      max(start_date - queued_dttm) AS max_queued_delay
   FROM task_instance
   WHERE dag_id = 'scenario1_case2_03_1' GROUP BY execution_date;
   ```
   
   |         execution_date         | min_quued_delay | max_queued_delay  | 
with change? |
   | ------------------------------- | ----------------- | ------------------ | 
-- | 
   | 2020-10-07 09:24:58.915889+01 | 00:00:01.494198 | 00:00:01.652728 | No |
   | 2020-10-06 01:00:00+01        | 00:00:00.08397  | 00:00:00.10932 | Yes | 
   
   This was discovered in my general benchmarking and profiling of the 
scheduler for AIP-15, but it's not tied to any of that work. There are more of 
these kind of improvements coming, each unrelated but all add up.
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code change, Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in 
[UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to