yuseok89 opened a new issue, #61815:
URL: https://github.com/apache/airflow/issues/61815

   ### Apache Airflow version
   
   main (development)
   
   ### If "Other Airflow 3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   The Connection Add page takes ~10 seconds to load on first access.
   
   - `GET /ui/connections/hook_meta` imports all Hook classes and their form 
definitions, which loads every provider and its dependencies.
   
   With 100+ connection types, this causes significant delay before users can 
interact with the form.
   I understand the slowdown is more noticeable because the main branch has all 
providers installed by default.
   Nevertheless, in my opinion, it would be good if this could be improved.
   
   
https://github.com/user-attachments/assets/56b3d239-015f-44f5-8d3d-ac5588faf2b6
   
   ### What you think should happen instead?
   
   It's not a critical issue, but for better user experience, the Add 
Connection form should be usable within about 1 second. To achieve this, 
connection types should load first, then metadata only when the user selects a 
type.
   
   | Step | Current | Proposed |
   |------|---------|----------|
   | Add button click | Load all types + metadata | Load types only |
   | Connection type dropdown | — | Populated from types API |
   | User selects type | — | Load metadata for that type only |
   | Form fields | — | Rendered from detail API |
   
   **Proposed API changes**:
   
   1. **`GET /ui/connections/connection_types`** (new, lightweight)
      - Returns only connection type identifiers
   
   2. **`GET /ui/connections/hook_meta/{connection_type}`** (new, on-demand)
      - Returns full metadata (standard_fields, extra_fields) for the selected 
type only
   
   3. **`GET /ui/connections/hook_meta`** (existing)
      - Kept unchanged for backward compatibility
   
   ### How to reproduce
   
   1. Install Airflow with many providers
   2. Go to Connections page.
   3. Click **Add** button.
   4. **This reproduces when the cache is cold** (first load or after restart): 
the page takes ~10 seconds before the connection type dropdown is usable.
   
   ### Operating System
   
   macOS
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Other Docker-based deployment
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   If the committers agree with this approach, I would like to implement it.
   If you approve, I would appreciate it if you could assign this issue to me.
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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