Fork me on GitHub
#lsp
<
2022-11-28
>
Noah Bogart18:11:37

I have a collectible card game (like magic the gathering) with roughly 1600 cards currently implemented. these are split into files by card type (agenda, asset, event, etc). Given how many cards there are, this is getting unwieldy to work with as each file is hitting 4k+ lines long. I've experimented with splitting the files into 1 card per file, and this works great in compilation and running, but clojure-lsp slows down a lot as it now has to process roughly 1700 files (100+ existing files, 1600 new card files). is there anything i can do to help speed things up?

ericdallo18:11:30

that's interesting, for other projects, I always noticed that more files and less lines == more speed/stability

ericdallo18:11:28

what you mean with slows down a lot? startup? completion?

Noah Bogart18:11:10

i found both start up to take longer and responding to code actions taking longer. it's possible my lsp client (coc.nvim) is playing some subtle role i don't quite understand

ericdallo18:11:59

a bigger project means more things to analyze in the end, so it's expected to be a little bit slower on specific tasks like startup and completion, but not that slow

Noah Bogart18:11:39

do you have notes in the repo for stress testing clojure-lsp? i can try those if so

ericdallo19:11:34

We have https://clojure-lsp.io/development/#debugging-profiling for debugging, but I think for your case it's just easier to check server logs which print the time each request took, so you can compare different versions and things like that or find what is taking so long which helps a lot

👍 1
ericdallo19:11:52

server log print example