Skip to content

Improve launch performance: skip redundant per-launch spawns and writes - #165

Closed
leo-3889 wants to merge 1 commit into
elirantutia:mainfrom
leo-3889:feat/launch-optimisation
Closed

leo-3889 wants to merge 1 commit into
elirantutia:mainfrom
leo-3889:feat/launch-optimisation

Conversation

@leo-3889

Copy link
Copy Markdown

Summary

Speeds up app launch (especially warm launches) by eliminating redundant per-launch work in the Claude provider:

  • Skip unchanged hook-script and settings.json writes on warm launch and profile spawns — the files are only rewritten when their content actually changes, so a warm launch no longer rewrites (and re-watches) them every time.
  • Cache the resolved Claude CLI version across launches — the version is resolved once and reused, skipping the per-launch --version spawn.
  • Defer PATH resolution / binary-fallback spawn until a fallback binary actually needs to be resolved, instead of doing it up front on every launch.

Testing

  • npm run build — all three targets compile.
  • npm test — 1868 pass. The one failure is a pre-existing, environment-specific Windows locale issue in big-initial-context.test.ts (expects 50,000, gets 50.000); unrelated to these changes and present on upstream main too.
  • New/updated unit tests cover the version cache, binary resolution, and hook-script write-skip logic (claude-version.test.ts, resolve-binary.test.ts, hook-commands.test.ts, claude-cli.test.ts).

- Skip unchanged hook-script and settings.json writes on warm launch and
  profile spawns.
- Cache the resolved Claude CLI version across launches to skip the
  per-launch version spawn.
- Defer PATH resolution / binary fallback spawn until actually needed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@leo-3889 leo-3889 closed this Sep 2, 2026
@leo-3889
leo-3889 deleted the feat/launch-optimisation branch September 2, 2026 19:08
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