-
Notifications
You must be signed in to change notification settings - Fork 54
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
LSPCodeActionMarkerResolution.getResolutions freezes UI #894
Comments
The underlying issue seems to be the blocking call org.eclipse.jface.text.TextViewerHoverManager.doPresentInformation() or
org.eclipse.ui.internal.views.markers.MarkersTreeViewer.doUpdateItem()
-> LSPCodeActionMarkerResolution.checkMarkerResolution()
-> LanguageServerProjectExecutor.withCapability(ServerCapabilities::getCodeActionProvider).anyMatching()
-> LanguageServerProjectExecutor.getServers()
-> LanguageServiceAccessor.getStartedWrappers()
-> ...capabilitiesComply(ServerCapabilities::getCodeActionProvider)
-> LanguageServerWrapper.getServerCapabilities()
-> ...getInitializedServer().get(10, TimeUnit.SECONDS); I think in case of LSPCodeActionMarkerResolution the LanguageServerProjectExecutor.anyMatching() call should only match already initialized servers and not wait for just started servers still initializing. This also means that the following javadoc statement for /**
* Waits if necessary for at most 50 milliseconds for getting a server...
*/
public boolean anyMatching() {
return getServers().stream().filter(this::matches).findFirst().isPresent();
} |
I think it makes sense to implement things as you're suggesting here. |
I'm trying to navigate through the sourcecode of a hello world nuxt.js example project in wildwebdevelopers (Eclipse 2023-12). Each file I open seems to freezes the Eclipse for ten or more seconds.
I took some threaddumps:
org.eclipse.lsp4e.operations.codeactions.LSPCodeActionMarkerResolution.getResolutions
blocks the UI because it waits for the language server(s) to start. Can this be made a non-blocking operation or return nothing if the servers are not yet ready?Triggered via
org.eclipse.jface.text.TextViewerHoverManager
:Triggered via
org.eclipse.ui.internal.views.markers.MarkersTreeViewer.doUpdateItem
:The text was updated successfully, but these errors were encountered: