GitHub user starkmarkus added a comment to the discussion: Airflow cli response times
Thanks for running that comparison. That is a useful baseline. So the picture seems to be: ```text clean apache/airflow:3.2.2 container on your system: airflow --help ≈ 2.1s original reported environment: airflow --help ≈ 4-8s ``` and the import profile suggests the time is mostly Python import / Airflow initialization overhead, especially around: ```text airflow airflow.configuration airflow.sdk.execution_time.task_runner airflow.sdk.bases.operator sqlalchemy ``` So I think the original conclusion still holds: - `airflow --help` does not appear to connect to the database - the empty `SQL_ALCHEMY_CONN` traceback was config parsing, not DB connection - `airflow --help` still initializes a non-trivial amount of Airflow before printing help - 4-8s is plausible on slower CPU / disk / container storage, but slower than the clean baseline shown here For @static-moonlight, the next useful comparison would probably be running the exact same command on the same slow test machine: ```bash docker run --rm --entrypoint=bash docker.io/apache/airflow:3.2.2 -lc 'time airflow --help' ``` If that is also slow, the environment/container storage is likely the main factor. If the clean container is around 2s but the application environment is 4-8s, then the extra cost is probably coming from environment-specific config, mounts, installed packages, filesystem latency, or startup hooks. So the practical answer to the original question seems to be: yes, `airflow --help` has noticeable startup/import overhead, but it should not normally be doing an actual database connection just to print help. GitHub link: https://github.com/apache/airflow/discussions/68707#discussioncomment-17407143 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
