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

is there a lsp-find-workspace-symbol waits me finish the query string before request language server? #2865

Closed
wenhoujx opened this issue May 14, 2021 · 9 comments

Comments

@wenhoujx
Copy link

hello, I am using lsp-mode with lsp-java, things works well in general. My biggest headache is lsp-ivy-workspace-symbol is super slow on my big java project, 2000 java files, and maybe millions of lib class :(
Is there a command that allows me to finish typing as much as i remember then send to the language server backend for results?

The ivy approach seems to start searching after i type just two letters.

please close if this is not the best place to ask. I am sorry but my current working laptop blocks the discord site.

@kiennq
Copy link
Member

kiennq commented May 14, 2021

Currently lsp-ivy is using async request for that, so unless your machine spec only allows one thread, this should not blocking your typing.
About lsp-ivy, can you try with https://github.com/kiennq/lsp-ivy? This fork contains a fix that will automatically cancel the request with new key type, hoping that will unload the server processing load too.

@yyoncho
Copy link
Member

yyoncho commented May 14, 2021

To answer your original question there are xref-find-apropos and lsp-ido-workspace-symbol. Also, after trying @kiennq suggestion can you test if helm-lsp is working fine? And if it is not can you provide perf report?

@wenhoujx
Copy link
Author

sure thing, will try this weekend.

@wenhoujx
Copy link
Author

@kiennq do know how can i check if my machine spec is only allowing one thread for emacs? this is a ubuntu VM i am running in aws.

@kiennq
Copy link
Member

kiennq commented May 14, 2021

@kiennq do know how can i check if my machine spec is only allowing one thread for emacs? this is a ubuntu VM i am running in aws.

Sorry, I should use more correct wording here, you can run nproc to see how many processors in your VM.
If your codebase is huge and the server process is doing work with all of the machine processors, Emacs will be slow.

@wenhoujx
Copy link
Author

wenhoujx commented May 14, 2021

nproc == 16, i doubt there is any heavy processes going on, i turned this box into my gccemacs boot loader. my only other process is jdtls server which i give 4g out of 64G total. i don't do anything else on this box.

@yyoncho
Copy link
Member

yyoncho commented May 14, 2021

Here is https://emacs-lsp.github.io/lsp-mode/page/performance/ guide.

Marking the issue as resolved because the original question was answered. If you think that there is perf issue, please report another issue providing the information as described in the link above. (also test with helm-lsp which is optimized and based on my test it works even with huge testing).

@yyoncho yyoncho closed this as completed May 14, 2021
@wenhoujx
Copy link
Author

(package! lsp-ivy
  :recipe (:host github :repo "kiennq/lsp-ivy") :pin "e759d94")

tested with this, the UX is better, b/c i can keep typing and it get stuck less often, I worry if this mean my jdt server is getting spamming? or is it truly cancelling those previous requests?

i think i will keep use this commit for a while and report back if there is something wrong.

@kiennq

@kiennq
Copy link
Member

kiennq commented May 15, 2021

The PR for this commit in lsp-ivy is here emacs-lsp/lsp-ivy#33

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