-
Notifications
You must be signed in to change notification settings - Fork 790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement DocumentHighlightsService #1943
Implement DocumentHighlightsService #1943
Conversation
Awesome |
3209e4f
to
3132f4c
Compare
💋 |
This whole change looks great
One specific thing is to understand whether Roslyn issues a cancellation for the request if the cursor moves into a different area, or if the user changes visible files. If it does, that helps make sure the FCS queue is not being choked up with useless work. Perhaps @vladima has experience w.r.t. performance testing for the typescript implementation, which also uses a single workqueue. |
|
Yep, I use it all the time. I think it's actually a help because of the warm-the-cache-when-the-user-interacts effect But what I'd really like is a methodology where we actually knew the effects of these changes through automation. Really we want to replay 100 typical editing sessions on small and big projects and take some statistics (e.g. longest UI pause, average reaction time etc.). But that's essentially impossible to do in an automated way. |
AFAIK there should not be any UI pauses at all (unless there is a GC pressure), because all Roslyn API is asynchronous. It does not matter what we do in background threads, the UI should stay responsive and it's guaranteed by core Roslyn code we plugged into. The fact that it's used by C#/VB editors as well makes some confidence that it interacts with UI thread carefully and it's battle tested since VS 2015. So I think this PR brings a better tagger than we have in VFPT. |
My experience in using VS2017 RC (master or bleeding-edge) is that there are a lot of UI blocks (at least when using a large solution which might indicate GC pressure). One known one seems to have been Ctrl-Space, though that's being fixed. But I'm seeing lots of non-responsiveness. But I agree that this PR should generally be OK. |
@dsyme Could you try and enumerate some of these cases in an issue? I think it would be really helpful to have some of these tracked. I've noticed some related to msbuild blocking the UI thread when f5'ing, but generally my issues have more been related to things like typechecking not being complete. |
f72b9d8
to
cb41e85
Compare
Conflicts: vsintegration/packages.config
fix tryClassifyAtPosition
@KevinRansom please merge it, it includes |
@vasily-kirichenko Thanks Kevin |
Done. |
It was broken, I've committed fix. |
* implement DocumentHighlightsService * use the right ImportingConstructor attribute * tolerate being on the right of the identifier * add a DocumentHighlightsService test * fix erroneous qualified symbol ranges (wip) * fix `fixInvalidSymbolSpans` * fix after merge * update Microsoft.CodeAnalysis.xxx packages to 2.0.0-rc * remove double try to find symbol * fix after merge fix tryClassifyAtPosition
It ignores
documentsToSearch
parameter as I'm not sure what it's for, maybe look at it in the future.