-
Notifications
You must be signed in to change notification settings - Fork 679
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
improve queues, (one effect: improve code completion) #4310
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4310 +/- ##
==========================================
- Coverage 86.01% 86.01% -0.01%
==========================================
Files 60 60
Lines 1859 1866 +7
Branches 215 216 +1
==========================================
+ Hits 1599 1605 +6
Misses 200 200
- Partials 60 61 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
For me, especially the other change, calling dequeue when a request is canceled is most important. Please note the log entries that I entered to debug the behaviour in 954ce95. I found out, the deferred queue is considered full just when two requests are canceled but remain in the _waiting queue forever. Then the queue does no longer accept further requests. This especially had an impact on code completion in the last versions. But also, Unit-test classes loose the "RunTest" links, Code Structure gets lost in the outline panel and so on. The code I am working on has lots of automapper statements which made trouble when calling codeactions couple of times that were subsequently canceled, some already _waiting. And suddenly all requests that are prioritized to deferred queue didn't reach out for the omnisharp server. I am not sure, if adding the id to the requests is proper, but at least solves a quick handling in the dequeue method. I think this fix addresses at least some of: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. We can delete the autocomplete entry and the definition in protocol.ts as well.
Going to need to sit down and go through the new cancellation code changes to understand the flow.
Sure. I needed to do these adjustments because I realized the OmnisharpWorkspaceSymbolProvider (ctrl-t) also needs request.onError to cancel the awaited task when it is in the waiting queue. Essentially what changed in the last 4 commits are two things:
Cheers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. This is mostly looking good, just a couple of small pieces of feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @JoeRobich for a second review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
After updating to the recent 1.23.x versions I had severe performance issues on code completion.
I investigated that and made the following changes:
The second bullet point addresses a deferred queue that stays always full when requests are cancelled. A symptom for that are many log entries of the kind: