lsp

2025-04-05T02:15:42.038789Z

how do i get :paths-ignore-regex to work? i have {:paths-ignore-regex ["test/__optic__/.*"]} as the contents of .lsp/config.edn, and when i run clojure-lsp diagnostics, it shows me errors in a file in test/__optic__/noahtheduke/...

$ cat .lsp/config.edn
{:paths-ignore-regex ["test/__optic__/.*"]}
noah@Noahs-MacBook-Pro ~/personal/fluent-clj  [main ≡ +4 ~4 -0 !]
$ clojure-lsp diagnostics
[ 99%] Project analyzed            Finding diagnostics...
test/__optic__/noahtheduke/fluent/pprint_test/pprint_str.clj:3:3: error: [unresolved-symbol] Unresolved symbol: parse-and-print-str 

karol.adamiec 2025-04-05T08:26:09.177569Z

unsure if it helps or is related, but you might find this relevant. https://clojurians.slack.com/archives/CPABC1H61/p1743841520804229?thread_ts=1743786186.677809&cid=CPABC1H61

karol.adamiec 2025-04-05T10:25:12.535709Z

did some more digging and looked at :paths-ignore-regex too. The path at time of matching regex is an absolute path, so you do need to start your regex expression with .* for example. {:paths-ignore-regex [".*test/__optic__/.*"]}

borkdude 2025-04-05T12:21:09.713809Z

How much RAM is clojure-lsp using on your machines typically when you look at your Activity Monitor or the equivalent thing on linux?

dharrigan 2025-04-05T12:41:29.807139Z

On my system (arch linux):

dharrigan 2025-04-05T12:41:40.702969Z

Private  +   Shared  =  RAM used	Program

925.0 MiB +   1.6 MiB = 926.5 MiB	clojure-lsp
---------------------------------
                        926.5 MiB
=================================

👍 1
lassemaatta 2025-04-05T12:45:54.207609Z

2.9 GiB thisisfine

dharrigan 2025-04-05T12:50:04.954269Z

(in above, note that this does not include virt memory, as if you count that, it's 32GB, but virt memory includes things like shared libraries, or mmaped files - but I don't tend to count virt memory, just rss (resident set size - the actual memory that is actually loaded into ram and currently being used)).

Evan 2025-04-05T13:10:05.733939Z

macOS:

Real Memory Size: 539.1 MB

Virtual Memory Size: 423.88 GB

Shared Memory Size: 9.5 MB

Private Memory Size: 488.1 MB

teodorlu 2025-04-05T13:17:51.693249Z

Tiny side project I'm in right now, one Clojure file: 359 MB. Work project: 847 MB.

practicalli-johnny 2025-04-05T15:03:54.828939Z

LSP was using several gigabytes on the last data science project I did. I assume there is a lot of variation depending on the project being analysed.

dpsutton 2025-04-05T16:22:02.673249Z

Typically 6gb for me

Chanakya 2025-04-07T07:29:43.433259Z

work project, 30k+ loc Between 2-2.5 GB usually (mac)

ericdallo 2025-04-07T12:44:31.081569Z

yes it vary depending on the size of the project, especially because of clj-kondo analysis we keep in memory, in Nubank I did tests that vary from 300mb to 2-3 GB. mem improvements suggestions/PRs are always welcome as that is not trivial to improve

borkdude 2025-04-07T12:45:29.011719Z

Other side question. How much memory do y'all have in your laptops

tatut 2025-04-07T12:46:20.796419Z

I have 5 clojure-lsp:s running (taking a total of ~3,2gb)… 32gb M1 pro mac, not worried about the memory usage

ericdallo 2025-04-07T12:47:40.129789Z

16gb asus zenbook

tatut 2025-04-07T12:48:46.196749Z

fwiw, docker images I run for databases and other auxiliary stuff to support the clojure apps, takes way more memory

1
tatut 2025-04-07T06:49:23.165099Z

between 0.5 and 1 gb

djm 2025-04-07T06:52:16.116349Z

After opening our main project at work, 3.3GB.