Skip to content

perf: lazy load cli command runners#53

Merged
freshtechbro merged 1 commit into
mainfrom
codex/optimize-cli-tools
May 10, 2026
Merged

perf: lazy load cli command runners#53
freshtechbro merged 1 commit into
mainfrom
codex/optimize-cli-tools

Conversation

@freshtechbro

Copy link
Copy Markdown
Owner

Summary

  • Lazy-load CLI command runner modules and keep help/version on cheap fast paths before command registration.
  • Add a current-source CLI/tools latency benchmark harness and setup plan.
  • Add parity coverage for lazy command imports plus bundled CLI smokes for fast paths and representative lazy commands.

Measurement

  • Stable split-current cheap CLI p95 accepted in the optimization loop: 51.5 ms, down from prior cheap CLI p95 of roughly 290.8 to 293.5 ms.
  • Post-review stable benchmark smoke: aggregate p95 312.5 ms, variance ratio 0.0290, status stable.
  • Tool registry attribution showed static import/bundle evaluation dominates; deeper registry import splitting is deferred to a separate phase.

Validation

  • git diff --check
  • npm run test -- tests/cli-tools-latency-baseline.test.ts tests/cli-help-parity.test.ts
  • npm run build
  • npm run lint
  • npm run typecheck
  • npm run test:release-gate
  • npm run test
  • Real-world dist CLI smokes for help/version text/json/stream-json, quiet help/version, native status, artifacts cleanup, and structured daemon-bound status/macro-resolve errors
  • RepoPrompt rereview: no remaining blocking findings or material PR-readiness risks

- Add current-source CLI/tools latency benchmark coverage.\n- Fast-path help/version before lazy command registration.\n- Cover lazy import contracts and representative bundled command dispatch.\n\nCo-authored-by: Codex <noreply@openai.com>
@freshtechbro freshtechbro merged commit 6145409 into main May 10, 2026
8 checks passed
@freshtechbro freshtechbro deleted the codex/optimize-cli-tools branch May 10, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant