Commit fd7e2c0
committed
perf: add --version fast-path to skip full import chain
When the user runs `codeflash --version`, read the version string
and exit immediately without importing cli, telemetry, models, or
any other heavy modules. This mirrors the pattern used in pip where
`pip --version` was optimized from 138ms to 20ms (7x).
Before: 524ms (imports cli.py -> cfapi -> models -> libcst -> ...)
After: ~16ms (imports only codeflash.version)1 parent 6f3f884 commit fd7e2c0
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
| |||
0 commit comments