-
Notifications
You must be signed in to change notification settings - Fork 408
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
Performance issues when adding lots of files #824
Comments
The main use case for this is when importing a new project into our workspace. I was thinking about not reporting changes while we add a new project. The problem with that is that changes may occur while the project is being imported by jdt.ls. If we turn off changes, these changes will be lost :-( |
Discussed with @fbricon that we could put the change notifications processing in the background and have a works queue. On the work queue, we could do optimizations like
The second avenue of approach is optimizing the code path for the common case (i.e. not doing excessive work int the change handler, as proposed in the issue description. |
I have imported the che project (https://github.com/eclipse/che) to Che 7 in the following way:
The Che 7 workspace uses the '/root/.m2' maven local repository that isn't persistent. I have used /workspace_logs/maven2.
c) downloaded java-0.43.0.vsix from https://raw.githubusercontent.com/snjeza/vscode-test/master/java-0.43.0.vsix and copied it to the /workspace_logs directory.
You can also use the snjeza/che-plugin-registry image and the following configuration:
d) added the che project to the Che 7 workspace
e) opened the /projects workspace in the Che Theia editor java-0.43.0.vsix includes the following changes:
|
So I've opened several sub-issues related to @snjeza's proposal:
|
I salute the efforts to make notification processing more efficient. However, on big ticket item that I don't see here is the offloading from the message handling thread. |
I think that is an upstream issue. See redhat-developer/vscode-java#867. The issue has been fixed in VS Code 1.33. |
From reading the issue, I don't think this is the same: the issue mentions cloning the project, then opening the cloned project folder. The scenario I'm thinking of is adding a project to an already open folder, thus creating boatloads of "file added" notifications. So the test case for this issue is really this:
I don't see that in your test script, correct? |
Hi, |
@nicobao you can try to increase the heap in the java.jdt.ls.vmargs setting (it's 1GB by default). But I have no idea how to do that from neovim though. |
Thanks for the tip. I changed from the default: I will see and let you know if I run into performance issue again. For info, configuring LSP on neovim is as easy as with vscode. If you use coc.nvim, you can modify |
When we import a new project into a che workspace, we add thousands of files, leading to thousands of "didChangeWatchedFiles()" notifications. Since the notifications are handled synchronously, this may delay processing of commands by minutes, leading to timeouts on the client side.
Handling change notifications in WorkspaceEvents seems to do many things which might not be strictly necessary. We should strive to optimzed this code path because it is used a lot.
As a more permanent fix, we should think about processing the notifications asynchronously and maybe even batching them: when adding or changing many files, subsequent calls are likely concern files close to each other in the file system tree.
The text was updated successfully, but these errors were encountered: