[
https://issues.apache.org/jira/browse/AIRFLOW-6887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17042809#comment-17042809
]
ASF GitHub Bot commented on AIRFLOW-6887:
-----------------------------------------
mik-laj commented on pull request #7510: [AIRFLOW-6887][WIP] Do not check the
state of fresh DAGRun
URL: https://github.com/apache/airflow/pull/7510
When I have following DAG File:
```python
from datetime import timedelta
from airflow.models import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.utils.dates import days_ago
args = {
'owner': 'airflow',
'start_date': days_ago(3),
}
def create_dag(dag_number):
dag = DAG(
dag_id=f'perf_50_dag_dummy_tasks_{dag_number}_of_50',
default_args=args,
schedule_interval=timedelta(minutes=30),
# schedule_interval=None,
dagrun_timeout=timedelta(minutes=60),
is_paused_upon_creation=False,
)
DummyOperator(
task_id='task_1_of_5',
dag=dag
)
return dag
for i in range(1, 200):
globals()[f"dag_{i}"] = create_dag(i)
```
I ran following code
```
from airflow.jobs.scheduler_job import DagFileProcessor
processor = DagFileProcessor([], log)
processor.process_file(DAG_FILE, None, pickle_dags=False)
```
I got the following values:
**Before:**
Query count: 1800
Average time 6104.482 ms
**After:**
Query count: 1601
Average time 5541.349 ms
**Diff**
Query count: 199 (-11%)
Average time 563 ms (-9%)
---
Issue link: WILL BE INSERTED BY
[boring-cyborg](https://github.com/kaxil/boring-cyborg)
Make sure to mark the boxes below before creating PR: [x]
- [ ] Description above provides context of the change
- [ ] Commit message/PR title starts with `[AIRFLOW-NNNN]`. AIRFLOW-NNNN =
JIRA ID<sup>*</sup>
- [ ] Unit tests coverage for changes (not needed for documentation changes)
- [ ] Commits follow "[How to write a good git commit
message](http://chris.beams.io/posts/git-commit/)"
- [ ] Relevant documentation is updated including usage instructions.
- [ ] I will engage committers as explained in [Contribution Workflow
Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
<sup>*</sup> For document-only changes commit message can start with
`[AIRFLOW-XXXX]`.
---
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).
Read the [Pull Request
Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)
for more information.
----------------------------------------------------------------
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]
> Do not check the state of fresh DAGRun
> --------------------------------------
>
> Key: AIRFLOW-6887
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6887
> Project: Apache Airflow
> Issue Type: New Feature
> Components: scheduler
> Affects Versions: 1.10.9
> Reporter: Kamil Bregula
> Priority: Major
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)