⚡ Performance Report — Week of 2026-04-06 (v2.6.37)
Automated analysis by the CLI Performance Monitor. Rust binary not present in CI, so measurements reflect the Python bootstrap layer (rust_bridge.py) which is the overhead before the Rust binary execs.
📦 Package & Bootstrap Startup
| Metric |
Time |
Budget |
Status |
import azlin (package __init__) |
24.6ms avg |
<50ms |
✅ Excellent |
import azlin.rust_bridge (full module) |
121.5ms avg |
<150ms |
✅ Good |
| P95 bootstrap time |
122.6ms |
<150ms |
✅ Within budget |
| Min bootstrap time |
120.2ms |
— |
— |
| Max bootstrap time |
122.6ms |
— |
— |
Dominant cost: urllib.request import (~111ms)
The rust_bridge.py module eagerly imports urllib.request at module load time (line 8), which accounts for ~92% of the 121ms bootstrap cost. This is pure stdlib overhead — no IO is performed, but the import itself is expensive.
🏗️ Architecture Note
Azlin v2.3.0+ is a Rust-first CLI with a thin Python bootstrap:
python3 -c "from azlin.rust_bridge import entry; entry()"
└─ rust_bridge.py (121ms) ← measured in this report
└─ exec() Rust binary ← not present in CI environment
└─ Clap parse (typ. 5-10ms)
└─ Command execution
The Rust binary itself (once installed) provides 75–85x faster startup than the original Python CLI (per CHANGELOG v2.3.0-rust). Live command benchmarks (azlin list, azlin connect, etc.) require the Rust binary and Azure access, which are unavailable in CI.
📊 Bootstrap Cost Breakdown (stdlib imports)
| Import |
Cost |
Notes |
urllib.request |
~111ms |
Largest single cost |
subprocess |
~23ms |
Already included in combined |
platform |
~27ms |
Already included in combined |
shutil |
~22ms |
Already included in combined |
pathlib |
~17ms |
Already included in combined |
| All combined |
~117ms |
Python deduplicates shared stdlib |
🔍 Optimization Opportunity
Lazy urllib.request import — This is the highest-impact optimization available in the Python bootstrap layer:
# Current (eager, at module level):
import urllib.request
# Recommended (lazy, inside download function only):
def _download_binary(url: str, dest: Path) -> None:
import urllib.request # Only imported when actually needed
...
Estimated impact: ~90ms reduction in bootstrap time (from ~121ms → ~30ms) for users who already have the Rust binary installed (the common case). The download path is only taken on first install or self-update, not on every CLI invocation.
Affected file: src/azlin/rust_bridge.py line 8
📈 Performance Baselines (Current)
| Metric |
Current |
Target |
Status |
| Python bootstrap (P95) |
122.6ms |
<150ms |
✅ |
Package __init__ import |
24.6ms |
<50ms |
✅ |
| Rust binary startup (expected) |
~5-10ms |
<100ms |
✅ (per v2.3.0 notes) |
azlin list (Rust, with cache) |
N/A in CI |
<200ms |
— |
azlin list (Rust, cold) |
N/A in CI |
<500ms |
— |
✅ Summary
- No regressions detected vs v2.6.36 (only change was a version bump)
- Bootstrap layer is within all performance budgets
- One optimization opportunity: lazy
urllib.request import could save ~90ms on every invocation for existing installs
- Rust binary benchmarks (
list, connect, create, delete) require an Azure-connected environment with the binary installed — these cannot be measured in CI
📋 Recommendations
- Low-effort win: Lazy-import
urllib.request inside _download_binary() and _build_from_source() only — saves ~90ms per invocation for users with the Rust binary already installed
- Track Rust binary perf separately: Add a CI step that downloads the published binary and benchmarks
--help, list --help, etc. (no Azure needed for help/version commands)
- Add
azlin version timing: The version subcommand requires no Azure and gives a clean Rust startup benchmark
Report generated by CLI Performance Monitor workflow on 2026-04-06 for azlin v2.6.37
Generated by CLI Performance Monitor
⚡ Performance Report — Week of 2026-04-06 (v2.6.37)
📦 Package & Bootstrap Startup
import azlin(package__init__)import azlin.rust_bridge(full module)Dominant cost:
urllib.requestimport (~111ms)The
rust_bridge.pymodule eagerly importsurllib.requestat module load time (line 8), which accounts for ~92% of the 121ms bootstrap cost. This is pure stdlib overhead — no IO is performed, but the import itself is expensive.🏗️ Architecture Note
Azlin v2.3.0+ is a Rust-first CLI with a thin Python bootstrap:
The Rust binary itself (once installed) provides 75–85x faster startup than the original Python CLI (per CHANGELOG v2.3.0-rust). Live command benchmarks (
azlin list,azlin connect, etc.) require the Rust binary and Azure access, which are unavailable in CI.📊 Bootstrap Cost Breakdown (stdlib imports)
urllib.requestsubprocessplatformshutilpathlib🔍 Optimization Opportunity
Lazy
urllib.requestimport — This is the highest-impact optimization available in the Python bootstrap layer:Estimated impact: ~90ms reduction in bootstrap time (from ~121ms → ~30ms) for users who already have the Rust binary installed (the common case). The download path is only taken on first install or
self-update, not on every CLI invocation.Affected file:
src/azlin/rust_bridge.pyline 8📈 Performance Baselines (Current)
__init__importazlin list(Rust, with cache)azlin list(Rust, cold)✅ Summary
urllib.requestimport could save ~90ms on every invocation for existing installslist,connect,create,delete) require an Azure-connected environment with the binary installed — these cannot be measured in CI📋 Recommendations
urllib.requestinside_download_binary()and_build_from_source()only — saves ~90ms per invocation for users with the Rust binary already installed--help,list --help, etc. (no Azure needed for help/version commands)azlin versiontiming: Theversionsubcommand requires no Azure and gives a clean Rust startup benchmarkReport generated by CLI Performance Monitor workflow on 2026-04-06 for azlin v2.6.37