Parent: #214
Problem
Every base_cli_option declaration scans the full associative model registry to detect name collisions and scans it again for each token. The registry contains multiple metadata entries per option, so model construction grows quadratically as generated CLIs add options.
This is declaration-time overhead before the application handler runs.
Evidence
Reviewed at commit d064f426681f0e340ff4990ba0c9830084a5fe12.
A focused same-process benchmark declaring one command with unique flag options measured:
| Options |
Elapsed |
| 100 |
0.37 s |
| 200 |
0.94 s |
| 400 |
3.01 s |
| 800 |
10.64 s |
Wall-clock values are environment-specific, but the roughly quadratic growth matches the nested full-registry scans in the implementation.
Impact
Large generated or plugin-composed CLIs pay multi-second startup costs, limiting extensibility even though lookup during parsing is map-based.
Acceptance criteria
Review validation
The existing benchmark contract covers small reference applications and passes; it does not vary declaration count.
Parent: #214
Problem
Every
base_cli_optiondeclaration scans the full associative model registry to detect name collisions and scans it again for each token. The registry contains multiple metadata entries per option, so model construction grows quadratically as generated CLIs add options.This is declaration-time overhead before the application handler runs.
Evidence
Reviewed at commit
d064f426681f0e340ff4990ba0c9830084a5fe12.A focused same-process benchmark declaring one command with unique flag options measured:
Wall-clock values are environment-specific, but the roughly quadratic growth matches the nested full-registry scans in the implementation.
Impact
Large generated or plugin-composed CLIs pay multi-second startup costs, limiting extensibility even though lookup during parsing is map-based.
Acceptance criteria
./tests/validate.sh.Review validation
The existing benchmark contract covers small reference applications and passes; it does not vary declaration count.