pass in cancellation token to bail out early in HasReferenceToAssembly#36176
Merged
heejaechang merged 1 commit intodotnet:masterfrom Jun 7, 2019
Merged
pass in cancellation token to bail out early in HasReferenceToAssembly#36176heejaechang merged 1 commit intodotnet:masterfrom
heejaechang merged 1 commit intodotnet:masterfrom
Conversation
this particular code path can take a long time if metadata reference hasn't created its symbols yet. this can get really bad if we try to show code lens for something like IDispose.Dipose and it tries to create all metdata references in the solution. since it is not cancellable, just passing by a Dipose method can cause this to occupy CPU 100% for several seconds and there is no way to make it go away. now we pass in cancellation token so that we can bail out sooner.
Contributor
Author
|
can you take a look @dotnet/roslyn-ide |
Contributor
Author
|
@jinujoseph can we take this to preview2? once @olegtk fixed cancellation issue on code lens OOP, this is next one that showed up. I don't think it is a regression. we always had this problem, just didn't notice before. but now since we are focusing on issues around this, I guess it is good time to fix this along with other ones we are fixing. |
CyrusNajmabadi
approved these changes
Jun 5, 2019
sharwell
approved these changes
Jun 5, 2019
Contributor
|
@olegtk is your changes already in preview2 ? |
Contributor
|
Not yet in Preview2, but can be today if I get it approved. |
jasonmalinowski
approved these changes
Jun 5, 2019
Contributor
|
@heejaechang , we will not be able to make the final build for preview2. |
jinujoseph
approved these changes
Jun 6, 2019
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.
this particular code path can take a long time if metadata reference hasn't created its symbols yet.
this can get really bad if we try to show code lens for something like IDispose.Dipose and it tries to create all metdata references in the solution.
since it is not cancellable, just passing by a Dipose method can cause this to occupy CPU 100% for several seconds and there is no way to make it go away.
now we pass in cancellation token so that we can bail out sooner.