You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/18 13:01:37 UTC

[GitHub] [airflow] potiuk commented on a diff in pull request #25121: Add "Optimizing" chapter to dynamic-dags section

potiuk commented on code in PR #25121:
URL: https://github.com/apache/airflow/pull/25121#discussion_r923346681


##########
docs/apache-airflow/howto/dynamic-dag-generation.rst:
##########
@@ -140,3 +140,20 @@ Each of them can run separately with related configuration
 
 .. warning::
   Using this practice, pay attention to "late binding" behaviour in Python loops. See `that GitHub discussion <https://github.com/apache/airflow/discussions/21278#discussioncomment-2103559>`_ for more details
+
+
+Optimizing DAG parsing in workers/Kubernetes Pods
+-------------------------------------------------
+
+Sometimes when you generate a lot of Dynamic DAGs in single DAG file, it might cause unnecessary delays
+when the DAG file is parsed in worker or in Kubernetes POD. In Workers or Kubernetes PODs, you actually
+need only the single DAG (and even single Task of the DAG) to be instantiated in order to execute the task.
+If creating your DAG objects takes a lot of time, and each generated DAG is created independently from each
+other, this might be optimized away by simply skipping the generation of DAGs in worker.

Review Comment:
   Yep. Self contained example is something I also wanted to add after creating the PR :)



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org