[
https://issues.apache.org/jira/browse/AIRFLOW-4963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16886946#comment-16886946
]
ASF GitHub Bot commented on AIRFLOW-4963:
-----------------------------------------
ashb commented on pull request #5596: [AIRFLOW-4963] Avoid recreating task
context
URL: https://github.com/apache/airflow/pull/5596
----------------------------------------------------------------
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]
> Avoid recreating task context
> -----------------------------
>
> Key: AIRFLOW-4963
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4963
> Project: Apache Airflow
> Issue Type: Improvement
> Components: core
> Affects Versions: 1.10.5
> Reporter: Bas Harenslak
> Priority: Major
> Labels: performance
>
> The task context is created by taskinstance.get_template_context() and called
> twice via _run_raw_task:
> # context = self.get_template_context()
> # 2nd time in render_template(), instead of passing it to render_template()
> This is costly (lots of variables initialized, DB session, datetime
> calculations) and can be avoided.
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)