This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-13
Channels
- # announcements (8)
- # architecture (11)
- # babashka (159)
- # beginners (112)
- # biff (4)
- # chlorine-clover (4)
- # cider (10)
- # clj-kondo (51)
- # cljs-dev (43)
- # cljsrn (10)
- # clojure (45)
- # clojure-bay-area (5)
- # clojure-europe (11)
- # clojure-france (4)
- # clojure-italy (4)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-sweden (1)
- # clojure-uk (8)
- # clojurescript (75)
- # code-reviews (1)
- # community-development (2)
- # conjure (88)
- # cryogen (5)
- # data-science (1)
- # datomic (3)
- # dirac (2)
- # fulcro (4)
- # helix (1)
- # jackdaw (5)
- # kaocha (5)
- # leiningen (2)
- # lsp (49)
- # malli (9)
- # mid-cities-meetup (1)
- # off-topic (8)
- # pathom (3)
- # polylith (19)
- # re-frame (6)
- # releases (3)
- # rewrite-clj (1)
- # shadow-cljs (98)
- # spacemacs (2)
- # tools-deps (6)
- # vim (4)
- # xtdb (6)
after the last update lsp has become practically unusable, am i the only one with this problem?
:didChange 10143ms
:codeAction 88ms
:codeAction 73ms
:documentHighlight 4ms
:hover 67ms
:codeAction 730ms
@U0BUV7XSA mentioned a slowness but we didn't find anything relevant yet and I'm not seeing those did-change peaks
No, but I should be able to find it soon. I still have the terminal open where I updated, I just need to go ~10000 lines up 🙃
the logs haven't always accurately covered how long the didChange
took, so if you might have to time from the client if you start spelunking history
@U0BBFDED7 could you try the
and check if looks smoother for you? (ignoring the didChange time on log as it will be incorect)
@U11EL3P9U maybe knows 🙂
I restarted lsp, opened the buffer again, waited for it to load and tested in the same place as before and it is much better
Nice, so indeed it was `https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.05.06-19.44.00 that introduced that
I always get all the bugs stuck, so if something doesn't work for someone somewhere, I'm definitely one of those people
Maybe this @U0BUV7XSA https://github.com/clojure-lsp/clojure-lsp/commit/857bdc186e5585771c3b50b2c444065fb2b2e018 Still I don't know why
when I watch diagnostics for the old version and new version come they are just coming in faster, so I suspect it's not that, but how much processing anaylze-changes is doing
@U0BBFDED7 do you use vim or emacs?
@U0BUV7XSA maybe vim is waiting for did-change for some reason? That change, made did-change only end after changes were analyzed
if I had to guess, although I don't know emacs and elisp, there is a problem with asynchronicity somewhere, because the main thread of emacs is blocked to the point that even the cursor was changing and ctrl-g
didn't help
@UKFSJSM38 no, the client is still responsive but the diagnostics update like 1 letter at a time since thats being sent from clojure-lsp. a good project to repro this stuff is editing clojure core repo code. core.clj by itself to start and make sure did-change there is relatively fast.
@U0BUV7XSA I tested on clojure.core and indeed took 28s of freezed emacs after changing a single char 😱
Oh it's faster but it still take a long time to update lsp things like diagnostics document highlight
Alright, we need to rollback that, but then we will face the issue I solved with that commit, concurrency on other methods while didChange didn't update the file :document with the changes
We probably can do sync the file change computation but leave kondo run to async, that probably would be the best approach, WDYT @U0BUV7XSA?
yeah, the 28s is related with kondo run, the file change computation is really fast
@U0BUV7XSA could you review that later please https://github.com/clojure-lsp/clojure-lsp/pull/424?
It was the best working approach I found and I'll keep testing it this week on that branch.
It would be great if you could test it as well @U0BBFDED7 (just run make
on the project root to generate a non native binary clojure-lsp
enough for the testing)
If it helps, I'm using lsp-mode <tel:202105101947|20210510.1947>, on Emacs 27.1, gnu/linux without any performance issues