You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/06/18 09:35:02 UTC
[jira] [Commented] (AIRFLOW-4377) Optimise object conversion in
DAG.owner
[ https://issues.apache.org/jira/browse/AIRFLOW-4377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16866399#comment-16866399 ]
ASF subversion and git services commented on AIRFLOW-4377:
----------------------------------------------------------
Commit 691728447afd736f6a1bbd3f594144c3445845fc in airflow's branch refs/heads/v1-10-stable from BasPH
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=6917284 ]
[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)