Validation-related commands are among the CLI's hottest paths:
extension:validate: 57.5K executions
project:ci: 15.2K
project:validate: 5.75K
A hands-on validation tour also showed that repeated validation workflows can spend substantial time in hidden setup work such as temp copying, Composer dependency bootstrap and tool initialization. This is especially costly in flows like validate → fix → revalidate, basic → full validation, target-version checks, and project/extension validation on large projects. Full PHPStan appeared idle while Composer dependency bootstrap ran with captured output; default temp copying prevented dependency reuse, while --no-copy left vendor//composer.lock behind and a warm rerun still took ~14s.
This directly affects the Validation experience in project dev: long-running validation should remain practical on large projects and repeated runs should avoid unnecessary work.
Proposal
Break down and measure stages of extension validate and project validate separately:
- source/temp copying
- Composer resolution/install
- verifier/tool setup
- actual analysis
Use these measurements to reduce repeated work across validation workflows through caching, reuse, unchanged-work detection and parallelization where appropriate.
Prioritize validation optimizations needed for the project dev Validation experience first, then other high-volume build/CI paths by volume × runtime.
Acceptance criteria
- Runtime is measured per major stage for first and repeated runs of extension validate and project validate.
- Copy, dependency bootstrap, tool setup and analysis time are distinguishable, with the largest contributors documented.
- At least one optimization is implemented, and p50/p95 telemetry can show before/after impact.
Validation-related commands are among the CLI's hottest paths:
extension:validate: 57.5K executionsproject:ci: 15.2Kproject:validate: 5.75KA hands-on validation tour also showed that repeated validation workflows can spend substantial time in hidden setup work such as temp copying, Composer dependency bootstrap and tool initialization. This is especially costly in flows like validate → fix → revalidate, basic → full validation, target-version checks, and project/extension validation on large projects. Full PHPStan appeared idle while Composer dependency bootstrap ran with captured output; default temp copying prevented dependency reuse, while
--no-copyleftvendor//composer.lockbehind and a warm rerun still took ~14s.This directly affects the Validation experience in
project dev: long-running validation should remain practical on large projects and repeated runs should avoid unnecessary work.Proposal
Break down and measure stages of
extension validateandproject validateseparately:Use these measurements to reduce repeated work across validation workflows through caching, reuse, unchanged-work detection and parallelization where appropriate.
Prioritize validation optimizations needed for the
project devValidation experience first, then other high-volume build/CI paths by volume × runtime.Acceptance criteria