-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use libyaml C library when available. #14577
Conversation
Whoops wrong commit. I'm chaning this to use cyaml everywhere. |
f739e85
to
7f97396
Compare
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
Oh, To make new providers work with 2.0.0 I'm going to have to do
Ugh. (Judos to @potiuk for writing tests for this exact case!) |
This makes loading local providers 1/3 quicker -- from 2s down from 3s on my local SSD. The `airflow.utils.yaml` module can be used in place of the normal yaml module, with the bonus that `safe_load` will use libyaml where available instead of always using the pure python version. I have not used this module in tests/docs code etc, as I don't want to force importing `airflow` (and everything in currently brings in) in to those contexts.
06c3540
to
93c330d
Compare
I think this shaves 3 minutes of the "WWW" tests - down to 8 minutes from 11 minutes, and about 6 minutes overall runtime (58mins for Py3.6 sqlite job, down to 52 -- still too high but this is an easy fix. |
This makes loading local providers 1/3 quicker -- from 2s down from 3s on my local SSD. The `airflow.utils.yaml` module can be used in place of the normal yaml module, with the bonus that `safe_load` will use libyaml where available instead of always using the pure python version. This shaves 3 minutes off the "WWW" tests - down to 8 minutes from 11 minutes. I have not used this module in tests/docs code etc, as I don't want to force importing `airflow` (and everything in currently brings in) in to those contexts. (cherry picked from commit 7daebef)
This makes loading local providers 1/3 quicker -- from 2s down from 3s on my local SSD. The `airflow.utils.yaml` module can be used in place of the normal yaml module, with the bonus that `safe_load` will use libyaml where available instead of always using the pure python version. This shaves 3 minutes off the "WWW" tests - down to 8 minutes from 11 minutes. I have not used this module in tests/docs code etc, as I don't want to force importing `airflow` (and everything in currently brings in) in to those contexts. (cherry picked from commit 7daebef)
This makes loading local providers (
ProvidersManager.initialize_providers_manager()
) 1/3 quicker -- from 2s down from 3s on my local SSD.The
airflow.utils.yaml
module can be used in place of the normal yaml module, with the bonus thatsafe_load
will use libyaml where available instead of always using the pure python version.I have not used this module in tests/docs code etc, as I don't want to force importing
airflow
(and everything in currently brings in) in to those contexts.