Skip to content

MEF import completion providers in background#55448

Merged
genlu merged 3 commits intodotnet:mainfrom
genlu:BackgroundImport
Aug 6, 2021
Merged

MEF import completion providers in background#55448
genlu merged 3 commits intodotnet:mainfrom
genlu:BackgroundImport

Conversation

@genlu
Copy link
Copy Markdown
Member

@genlu genlu commented Aug 5, 2021

@genlu genlu requested a review from a team as a code owner August 5, 2021 23:14
@ghost ghost added the Area-IDE label Aug 5, 2021
@genlu genlu requested a review from sharwell August 5, 2021 23:14
Comment on lines 59 to 68
var serviceTypeAssemblyQualifiedName = typeof(ISnippetInfoService).AssemblyQualifiedName;
foreach (var languageService in _languageServices)
{
if (languageService.Metadata.ServiceType == serviceTypeAssemblyQualifiedName &&
languageService.Metadata.Language == languageName)
languageService.Metadata.Language == _languageName)
{
_ = languageService.Value;
break;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ Can this entire method be reduced now that we have the workspace?

_workspace.Services.GetLanguageService<ISnippetInfoService>(_languageName);

Copy link
Copy Markdown
Member Author

@genlu genlu Aug 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this, it seems getting LS from workspace could be slightly more expensive so we might still want to avoid doing it on UI thread?

Copy link
Copy Markdown
Contributor

@sharwell sharwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely prefer this solution.

…actCreateServicesOnTextViewConnection.cs

Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
…actCreateServicesOnTextViewConnection.cs

Co-authored-by: Sam Harwell <sam@tunnelvisionlabs.com>
@genlu genlu enabled auto-merge August 5, 2021 23:42
@genlu genlu merged commit 0a8b779 into dotnet:main Aug 6, 2021
@ghost ghost added this to the Next milestone Aug 6, 2021
@sharwell sharwell mentioned this pull request Aug 6, 2021
Copy link
Copy Markdown
Contributor

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks for the changes!

@genlu genlu deleted the BackgroundImport branch August 6, 2021 18:12
@dibarbet dibarbet modified the milestones: Next, 17.0.P4 Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants