Skip to content

perf: move ExtHost initialization to LifecyclePhase.Starting#511

Merged
j4rviscmd merged 1 commit into
mainfrom
feat/exthost-early
May 10, 2026
Merged

perf: move ExtHost initialization to LifecyclePhase.Starting#511
j4rviscmd merged 1 commit into
mainfrom
feat/exthost-early

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Move extension host initialization trigger from LifecyclePhase.Ready to LifecyclePhase.Starting in TauriExtensionService
  • This allows Bun process spawn, IPC connection, and handshake to overlap with workbench layout creation, reducing perceived startup delay by hundreds of milliseconds
  • Update JSDoc comment to reflect the new lifecycle phase

Context

Previously, ExtHost initialization waited until all eager services were instantiated (Ready phase). However, all services needed by the initialization chain (IUserDataInitializationService, workspace context, environment service) are available at Starting phase — and IUserDataInitializationService.initializeInstalledExtensions() is effectively a no-op in the Tauri build (empty initializers array).

The _createExtHostInitData() call (which needs ITelemetryService and other Ready-phase services) runs after Bun spawn + WebSocket handshake completes (~hundreds of ms), by which point Ready has already been reached.

Closes #506

Test plan

  • Verify extensions load correctly on startup (e.g., Git extension appears in status bar)
  • Verify editors open normally
  • Check console logs for extension-related errors
  • Regression: if issues arise, reverting to LifecyclePhase.Ready is a one-line change

🤖 Generated with Claude Code

Start extension host initialization earlier (at Starting phase
instead of Ready) so that Bun process spawn, IPC connection, and
handshake overlap with workbench layout creation. This reduces
perceived startup delay by hundreds of milliseconds.

Closes #506

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@j4rviscmd j4rviscmd added enhancement New feature or request tauri Tauri 2.0 移行関連 area:extensions labels May 10, 2026
@j4rviscmd j4rviscmd merged commit c8f676d into main May 10, 2026
7 checks passed
@j4rviscmd j4rviscmd deleted the feat/exthost-early branch May 10, 2026 03:15
@j4rviscmd j4rviscmd mentioned this pull request May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:extensions enhancement New feature or request tauri Tauri 2.0 移行関連

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExtHost早期起動(LifecyclePhase最適化)

1 participant