-
Notifications
You must be signed in to change notification settings - Fork 206
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
[critical] Slow code completion takes more than a 1 sec. #293
Comments
@martinlippert @BoykoAlex This particular work-space i'm working with has nearly 10K files. Seems like there is a AST parsing happening on each completion call. This happens mainly when working in java files, i haven't checked the config files. |
This happens in latest nightly |
@gayanper do you happen to have that workspace publicly available in a git repo somewhere? I see that resolving/compiling a CU takes time. Maybe we cannot do much about it for a large workspace. However, any subsequent CA invocation in the same file should quick because the resolved CU is cached... Are you seeing the same time for CA in the same file on subsequent invocations? |
@BoykoAlex The workspace is a private workspace which has proprietary code. Well the problem is subsequent invocations at the same place in the same file seems have constant delay :(. |
Well... I assume the user will not just invoke CA twice in a row without actually typing at least a little in between, so some changes will usually happen to the file content before the next CA invocation. So wouldn't that invalidate the cache? Parsing current file is sort of unavoidable is it not? |
Yes... we should probably somehow have a working copy on the LS side and update it probably with every doc content change message for things to be as quick as in JDT... |
(comment in Pivotal Tracker added by Alex Boyko:) @mlippert I think we should do this post 4.2.2... CU parsing on Win takes ~500ms and is the bottleneck. I have some ideas how to update CU cache for doc open/changed/closed. It seems to help when i did it for doc change. It won't be a one day work and there will some risk with those changes too. It doesn't look like regression to me... |
(comment in Pivotal Tracker added by Alex Boyko:) CU parsing in JDT calls |
(comment in Pivotal Tracker added by Alex Boyko:) Polished prototype is in sts4 git repo branch: |
I think you meant @martinlippert not me. |
(comment in Pivotal Tracker added by Martin Lippert:) I tried the branch and using content-assist in the java editor a lot and it was always super fast and responsive. I think this is a great step forward. The reflection work is not pretty, but since we don't have to make this work for various Eclipse versions at the same time, I am not so worried about it. Do you have automated unit tests to discover problems with the reflection hacks if we decide to update the jdt.core version inside of the language server? |
(comment in Pivotal Tracker added by Alex Boyko:) Pushed to master (test is there) |
When invoking LSP code completion the spring-boot completion take more than 1 sec.
The text was updated successfully, but these errors were encountered: