Reduce extension activation time#1932
Open
matthewbastien wants to merge 4 commits intoswiftlang:mainfrom
Open
Conversation
2c48d05 to
66a34a5
Compare
award999
reviewed
Nov 19, 2025
0b32ba9 to
3005dd8
Compare
3005dd8 to
306389d
Compare
3 tasks
32cfa8e to
73f7aed
Compare
b0463c8 to
0398f64
Compare
2e091c0 to
085b1dc
Compare
5ab263c to
a3704f9
Compare
8ad9454 to
2aeedb4
Compare
plemarquand
requested changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR moves the creation of the
WorkspaceContextoff of the critical path for extension activation. Most of the extension activation logic has been moved into a newInternalSwiftExtensionApiclass that has synchronousactivate()anddeactivate()methods to help avoid future performance issues with activation. Going forward we should keep theactivate()method as slim as possible insrc/extension.ts.Acquiring the
WorkspaceContextis now asynchronous using newwaitForWorkspaceContext()andwithWorkspaceContext()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
[ ] Documentation has been updated