← Back to issue list

perf: lazy-load extension framework modules

View original Github issue

Metadata

Project
rockcraft
Number
#1208
Type
pull request
State
open
Author
lczyk
Labels
Created
Updated
Closed

Current evaluation

Makes rockcraft's extensions package lazy-load its six framework modules instead of importing them eagerly at import time, to speed up CLI startup. CI fully green, zero maintainer review; target file still eagerly imports, so the change is still applicable.

Suggested action: needs review

Reason: External contributor opened this 109 days ago with 0 comments and 0 reviewers, but all CI checks pass and I verified rockcraft/extensions/__init__.py still eagerly imports all six framework modules (django, expressjs, fastapi, flask, go, springboot) and registers them at import time, so the PR is not superseded. The repo remains active (recent commits like #1349, #1345, #1320), and the lazy-registration approach needs a maintainer to confirm it preserves get_extension_names()/registry behavior, so it warrants review rather than closure.

Impact: 35 Quick Win: 19.25 Staleness: 58 Complexity: 45 Confidence: 80

Issue body

just an idea. the extensions package eagerly imported all six framework modules at import time. for most `rockcraft ...` calls its not needed. i've changed the extensions to be lazy loaded (ahead of https://peps.python.org/pep-0810/ landing in 3.15) --- - [x] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/blob/main/CONTRIBUTING.md). - [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/). - [x] I've successfully run `make lint && make test`. - [x] I've added or updated any relevant documentation. - [x] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing. - [ ] I've updated the relevant release notes.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 35
Quick Win: 19.25
Staleness: 58
Complexity: 45
Confidence: 80
needs review Makes rockcraft's extensions package lazy-load its six framework modules instead of importing them eagerly at import time, to speed up CLI startup. CI fully green, zero maintainer review; target file still eagerly imports, so the change is still applicable.
qwen/qwen3.6-35b-a3b
Staleness: 60
Complexity: 20
Confidence: 85
needs review Optimizes startup performance by lazy-loading extension framework modules instead of eager imports. All CI checks pass, but the PR has received zero reviewer comments and has been inactive for 69 days.
qwen3.6-35b-moe-q4
Staleness: 65
Complexity: 20
Confidence: 75
needs review Changes extension framework modules to lazy-load instead of eager-load to improve startup performance. Currently awaiting maintainer review with no comments or updates in 54 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 15
Confidence: 80
needs review Replaces eager imports of six extension framework modules with lazy loading to improve startup performance. Passes lint and tests but has zero maintainer feedback after 51 days.
qwen3.6-35b-a3b-mtp-q6
Staleness: 40
Complexity: 35
Confidence: 85
needs review Replaces eager imports of extension framework modules with lazy loading to improve startup performance. Open, inactive for 32 days, unreviewed, and awaiting release note updates before merge.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.