ashb opened a new pull request #19709:
URL: https://github.com/apache/airflow/pull/19709
This drops the time to first request from 37s to 20s by making the
following changes:
- Don't pre-load the app when not in daemon mode.
The purpose of the call to `cached_app()` was to ensure that any
errors are reported on the terminal before it is detached to make
failures more obvious to the user (which is a good feature).
However the comment about "pre-warm the cache" was incorrect and did
not happen -- since we run gunicorn by spawning a whole new process
it doesn't share any state from the current python interpreter.
- Don't load/initialize providers when only importing airflow.www.views
As it was written it would load the providers hook's at import time.
This changes it through a combination of cached properties and the
existing `init_connection_form` function.
(`extra_fields` is not set as a cached_property because of how FAB
works -- it iterates over all attributes of the class looking for
methods/routes and then looks at properties on it, meaning it would
still access the property too early)
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]