Commit 895bdfb
committed
perf: reduce DevExtension discovery max_depth from 3 to 2
The _collect() helper in DevExtension.get_all() recursively walks directories
to find *.egg-info markers. A max_depth of 3 is excessive since standard dev
extension layouts place .egg-info at depth 1 (pip install -e) or depth 2
(azure-cli-extensions repo: src/<ext_name>/*.egg-info).
Reducing to max_depth=2 eliminates an entire level of recursive os.path.isdir(),
glob(), and os.listdir() calls, saving ~30-50 ms on Windows when DEV_EXTENSION_SOURCES
is configured.1 parent 9428bc2 commit 895bdfb
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
0 commit comments