-
Notifications
You must be signed in to change notification settings - Fork 58
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 marker resolution performance #154
Improve marker resolution performance #154
Conversation
6738ee1
to
9d5bece
Compare
org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageServiceAccessor.java
Outdated
Show resolved
Hide resolved
org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageServiceAccessor.java
Outdated
Show resolved
Hide resolved
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.
i like this idea a lot. We indeed often don't need to connect
a file to get some features. I'm actually even curious when connecting a file is really necessary; apart from open/edit/close? Maybe we should never connect by default and only do it when necessary?
org.eclipse.lsp4e/src/org/eclipse/lsp4e/LanguageServiceAccessor.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
public static @NonNull List<CompletableFuture<LanguageServer>> getInitializedLanguageServers(@NonNull IFile file, | ||
@Nullable Predicate<ServerCapabilities> request, boolean connectFile) throws IOException { |
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.
I suggest forceConnectFile
instead, as the file may already be connected. Also, do you have any suggestion what could be a better term than connect
?
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 for the review. I have done the changes.
You mean, a better name for LanguageServerWrapper#connect
? I guess open
would be a better name, in the end the effect of it is to created the document synchronizer which sends a didOpen notification, isn't it?. I do not know if it is worth renaming the methods now that they already exist.
dfb25e2
to
432f259
Compare
I would also think one should only |
From the last version of the PR it is clear that there is nothing in LSP4E that needs the side-effect of calling |
Great, let's try it!
The policy has been to stay on 0.x stream to somehow emphasize their is no API policy ;) |
by not connecting the file where we retrieve marker information. That is an unnecessary step which can be expensive (for example the Xtext language server rebuilds the source) and causes timeouts on checkMarkerResoultion. The side-effect of connecting the document when getting an initialized server has been removed from all the LanguageServerAccessor#getInitializedLangugeServer* methods. Downstream project which rely on this behaviour should connect the document after getting the initialized server.
432f259
to
dc5c7a3
Compare
by not connecting the file where we retrieve marker information. That is
an unnecessary step which can be expensive (for example the Xtext
language server rebuilds the source) and causes timeouts on
checkMarkerResoultion