Skip to content
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

very slow on large project comparing to intellij #3202

Closed
yimingwangdell opened this issue Jun 24, 2024 · 14 comments
Closed

very slow on large project comparing to intellij #3202

yimingwangdell opened this issue Jun 24, 2024 · 14 comments

Comments

@yimingwangdell
Copy link

completion on large project has millions of lines is too slow.
it takes 20s to get the result for first completion of a class instance.
but on inteiilj it takes only 2 seconds or 1 seconds if indexing is done.

@fbricon
Copy link
Contributor

fbricon commented Jun 24, 2024

have you tried increasing the memory allocated to the Java language server (e.g. set -Xmx4G or more) ?

@yimingwangdell
Copy link
Author

yimingwangdell commented Jun 24, 2024

@fbricon I set -Xmx16G, and my server has 32G mem

@snjeza
Copy link
Contributor

snjeza commented Jun 24, 2024

@yimingwangdell Could you attach a project example?

@yimingwangdell
Copy link
Author

@snjeza sorry I cannot attach a project now, but I've noticed that there are some big .java files generated by protobuf, which have more that 200000 lines and some single java files more than 10000 lines is referencing classes from that protobuf java file.

@yimingwangdell
Copy link
Author

@snjeza neoclide/coc-java#129 my issue looks similar to this one.

I also have same response delay issue as above.
image

@snjeza
Copy link
Contributor

snjeza commented Jun 25, 2024

I also have same response delay issue as above.

@yimingwangdell Have you tried to set "diagnostic.refreshAfterSave": true ?

@yimingwangdell
Copy link
Author

@snjeza Property diagnostic.refreshAfterSave is not allowed. (json)X

@yimingwangdell
Copy link
Author

@snjeza I see this config in my coc config, but it looks this property was deprecated

@snjeza
Copy link
Contributor

snjeza commented Jun 25, 2024

@yimingwangdell Could you try to set "java.completion.maxResults": 50, ?

@yimingwangdell
Copy link
Author

@snjeza I've tried, actually I set 30 before.

@yimingwangdell
Copy link
Author

@snjeza I use java 11 as runtime, I notice that the memory for java 11 lsp is only 4096m, I guess maybe I need to increase memory for java11.
but I don't see there is a way to do that in coc-java or nvim-jdtls.
image

@yimingwangdell
Copy link
Author

@snjeza after switching from coc-java to native lsp, all problems gone.

@fbricon
Copy link
Contributor

fbricon commented Jun 25, 2024

What is native LSP?

@yimingwangdell
Copy link
Author

@fbricon nvim-jdtls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants