Skip to content

Reduce extension activation time#1932

Open
matthewbastien wants to merge 4 commits intoswiftlang:mainfrom
matthewbastien:reduce-activation-time
Open

Reduce extension activation time#1932
matthewbastien wants to merge 4 commits intoswiftlang:mainfrom
matthewbastien:reduce-activation-time

Conversation

@matthewbastien
Copy link
Member

@matthewbastien matthewbastien commented Nov 11, 2025

Description

This PR moves the creation of the WorkspaceContext off of the critical path for extension activation. Most of the extension activation logic has been moved into a new InternalSwiftExtensionApi class that has synchronous activate() and deactivate() methods to help avoid future performance issues with activation. Going forward we should keep the activate() method as slim as possible in src/extension.ts.

Acquiring the WorkspaceContext is now asynchronous using new waitForWorkspaceContext() and withWorkspaceContext() methods. This will be a breaking change for users of the extension API. I've bumped the version to 1.0.0 to indicate this.

Issue: #2082

Tasks

  • Required tests have been written
  • [ ] Documentation has been updated
  • Added an entry to CHANGELOG.md if applicable

@matthewbastien matthewbastien added the full-test-run Perform a full test suite run. Apply this label before pushing up a PR or commit label Nov 11, 2025
@matthewbastien matthewbastien force-pushed the reduce-activation-time branch 5 times, most recently from 2c48d05 to 66a34a5 Compare November 18, 2025 22:47
@matthewbastien matthewbastien force-pushed the reduce-activation-time branch 4 times, most recently from 0b32ba9 to 3005dd8 Compare December 1, 2025 21:14
@matthewbastien matthewbastien force-pushed the reduce-activation-time branch from 3005dd8 to 306389d Compare January 6, 2026 18:43
@matthewbastien matthewbastien force-pushed the reduce-activation-time branch 5 times, most recently from 32cfa8e to 73f7aed Compare January 12, 2026 18:41
@matthewbastien matthewbastien force-pushed the reduce-activation-time branch 2 times, most recently from 2e091c0 to 085b1dc Compare February 10, 2026 19:45
@thePianoKid thePianoKid mentioned this pull request Feb 10, 2026
3 tasks
@matthewbastien matthewbastien force-pushed the reduce-activation-time branch 2 times, most recently from 5ab263c to a3704f9 Compare February 10, 2026 20:12
@matthewbastien matthewbastien marked this pull request as ready for review February 11, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-test-run Perform a full test suite run. Apply this label before pushing up a PR or commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants