-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
Suspicion: when Calva's REPL window has a lot of text, it is slowing down clojure-lsp #1250
Comments
Speaking with @ericdallo about this it seems we can't cut off clojure-lsp analysis of this file without also loosing the clojure-lsp services in the file. So a worst case solution (given that this really is a problem) is to make clojure-lsp ignore the file and drop the clojure-lsp support there. |
To stop clojure-lsp from analyzing the repl file, these are some possible options off the top of my head, without looking further into it right now:
|
I temporary fix for users right now is cleaning the repl as well... |
a simple way to reproduce:
(->> (range 100000)
(run! #(println "line " %)))
EDIT: adding step 5
|
Odd, I could not repro that slowness or high CPU 🤔 Even so, a huge clojure buffer will certainly affect the performance (only for that buffer, other buffers should work normally as expected). My suggestion would still work for this case |
I can repro the issue if I try to edit the repl and complete something I even got a OOM exception, and we can see rewrite-clj is having issues as it needs to parse a huge text:
|
Oh, you're correct, I also evaluated some expression in the REPL window, just after all that output got appended to the REPL window. So I'm adding step 5:
|
This should fix the issue: #1479 |
As VS Code is sending all Clojure files to clojure-lsp, and the REPL/output window is a Clojure file, it is analysed and could potentially be causing performance problems affecting the whole project.
The text was updated successfully, but these errors were encountered: