[
https://issues.apache.org/jira/browse/AIRFLOW-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16867348#comment-16867348
]
ASF subversion and git services commented on AIRFLOW-4377:
----------------------------------------------------------
Commit 555f35e67dbdd80f7ba8694310dbbb899f4453a4 in airflow's branch
refs/heads/v1-10-stable from BasPH
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=555f35e ]
[AIRFLOW-4377] Remove needless object conversion in DAG.owner() (#5144)
(cherry picked from commit 020a583a3baea88a0fda017237980540b50e5f03)
> Optimise object conversion in DAG.owner
> ---------------------------------------
>
> Key: AIRFLOW-4377
> URL: https://issues.apache.org/jira/browse/AIRFLOW-4377
> Project: Apache Airflow
> Issue Type: Improvement
> Reporter: Bas Harenslak
> Assignee: Bas Harenslak
> Priority: Minor
> Fix For: 1.10.4
>
>
> Small optimisation possible in DAG.owner():
> Current implementation:
> {code}
> python -m timeit -n 1000000 '", ".join(list(set([i for i in ["test"]*100])))'
> 1000000 loops, best of 3: 4.47 usec per loop
> {code}
> The list & set conversion is not needed, so:
> {code}
> python -m timeit -n 1000000 '", ".join({i for i in ["test"]*100})'
> 1000000 loops, best of 3: 2.67 usec per loop
> {code}
> A +-40% speedup :)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)