dstandish opened a new pull request, #64131:
URL: https://github.com/apache/airflow/pull/64131

   The `generate-openapi-spec` prek hook was running with `backend="postgres"`, 
adding ~90 seconds of Postgres container startup and DB migration overhead on 
every invocation.
   
   Since OpenAPI spec generation only introspects FastAPI routes and never 
queries the database, Postgres is unnecessary. Switching to `backend="sqlite"` 
cuts the hook runtime from ~2 minutes to ~25 seconds (~78% faster).
   
   Benchmarks (wall clock, measured via `time`):
   
   | Backend | `skip_environment_initialization` | Time |
   |---|---|---|
   | postgres | False (original) | ~2 min |
   | postgres | True | ~31 s |
   | **sqlite** | **False** | **~25 s** ← new |
   | sqlite | True | ~31 s |
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Sonnet 4.6
   
   Generated-by: Claude Sonnet 4.6 following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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]

Reply via email to