-
Notifications
You must be signed in to change notification settings - Fork 392
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
Optimize pipeline for LSP request scheduling #2518
Comments
The jsonrpc processor can be blocked by some handlers as below, which can affect the performance and responsiveness of the language server. To reproduce the blocking, open a medium-sized project like https://github.com/google/guava, trigger a full build and then type code for completion while the build is in progress. The completion may sometimes not respond because the jsonrpc processor is stuck on some handlers. |
When
|
One of the optimization challenges is calling |
From the performance analysis, we found that the scheduling conflicts between LSP requests, especially lock conflicts between different WorkspaceJobs, can have a criticial impact on the responsiveness of language server. We definitely need to revisit the use of all WorkspaceJobs in jdtls and remove or shrink scheduling rules of lock.
In jdtls, the following operations would create workspace jobs or scheduling rules.
ResourcesPlugin.getWorkspace().run(...)
, this will run in current thread. It has risk to block the lsp4j jsonrpc processor thread, causing all subsequent lsp requests to queue.new WorkspaceJob(...)
, this will run in a seperate thread.IResource.refreshLocal(...)
Here are all potential workspace jobs usages.
Known perf issues:
The text was updated successfully, but these errors were encountered: