-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove GetService(...) calls from VS MEF importing constructors (#10168)
We observed a hang during solution load because `VisualStudioEditorDocumentManager` retrieves the `IVsRunningDocumentTable` service in its constructor. When this constructor is called on a background thread, it results in an implicit marshal to the UI thread in order to retrieve the service and QI for its COM interface. This change fixes that issue delaying the request for `IVsRunningDocumentTable` until it is needed and running on the UI thread. In addition, `VisualStudioFileChangeTrackerFactory` had a similar issue but with `IVsAsyncFileChangeEx`. Because `IFileChangeTrackerFactory` is imported by `VisualStudioEditorDocumentManager`, I've fixed this service as well.
- Loading branch information
Showing
2 changed files
with
21 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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