hterik commented on issue #21707: URL: https://github.com/apache/airflow/issues/21707#issuecomment-1050064745
Python is inherently a bit slow to start up so don't expect any magic. Airflow though is a bit of an extra bad case though since it imports so many other modules. If you use the Docker image it is even slower (assume you do since using K8), because 1. The entrypoint performs some `airflow db check` before starting any tasks. Not sure why. This takes 5 seconds some times. 2. You loose the `.pyc`-caching since it starts a fresh container each time. I did some test long ago by pre-baking the .pyc files by simply ending the Dockerfile with `RUN airflow --help` and it shaved off almost a complete second on subsequent docker runs. Maybe i should upstream this fix to the official image? -- 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]
