cursive

danielcompton 2025-07-26T05:02:31.894139Z

I’ve noticed “Initialising clj-kondo” shows up quite often while editing and takes a few seconds each time. Is it possible to keep clj-kondo running in the background, or otherwise do the checking more quickly? (I realise that may conflict with memory goals)

👍 1
borkdude 2025-07-26T07:23:19.707169Z

@cfleming maybe you can do another EAP based on master. Almost all heap should now be released after running clj-kondo and the throughput of inspecting all files became much faster

2025-07-26T16:40:42.146629Z

+1, to me that loader is almost always shown. @cfleming just some feedback on the feature, I loved that Cursive immediately (or very fastly) inspected the changes and notified what was wrong. Tried this clj-kondo integration and sometimes I need to wait for various seconds (~20) to get updated/correct hints on my code, sometimes they just never get fixed (e.g. sometimes I use a var and it's marked as unused forever, unless I re-edit that code). Not sure, that may be the natural slowness of clj-kondo, but I ended up disabling the plugin, still needs a bit of polishing. And thank you for Cursive!

cfleming 2025-07-26T22:34:18.633909Z

@borkdude Yes, I'll get that out soon, I was tied up yesterday with a different problem.

cfleming 2025-07-26T22:35:51.917259Z

@ulises.ssb506 Yes, a certain amount of slowness is just inevitable unfortunately, the process of calling an external thing is just necessarily slower. I'm thinking about how to handle cases where Cursive + Kondo provide the same inspections, perhaps I'll provide an option to disable the kondo one when Cursive provides the equivalent, so at least those ones will be faster.

❤️ 1
borkdude 2025-07-26T22:35:53.294499Z

@cfleming meanwhile I released a stable released with additional tweaks that should make stuff faster. I got a 2x speedup in linting with the native-image on metabase's src folder. an 8x or so speedup with "inspect all files" in your script.

🎉 1
cfleming 2025-07-26T22:36:18.908769Z

Very nice!

borkdude 2025-07-26T22:37:53.165939Z

yeah, glad we were able to find and solve this

cfleming 2025-07-26T22:41:55.046599Z

Yes, definitely, looks like a good improvement for everyone!

cfleming 2025-07-26T22:42:33.644479Z

In general, what are the differences in performance when using the compiled kondo compared to the JVM, assuming I use it in-process so there's no startup cost?

cfleming 2025-07-26T22:42:52.624119Z

Would you expect the JVM to generally be faster?

borkdude 2025-07-26T22:43:05.565289Z

JIT (JVM) is probably faster after multiple runs

cfleming 2025-07-26T22:43:20.580189Z

Got it, thanks.

borkdude 2025-07-26T22:44:17.988369Z

@ericdallo chose to do clojure-lsp as a native image mostly for the startup time I think, but it also uses less memory. he says he hasn't seen much performance difference

borkdude 2025-07-26T22:44:39.936959Z

💤 time now 👋

cfleming 2025-07-26T22:44:53.074039Z

Sleep well!

ericdallo 2025-07-26T22:48:04.485659Z

@borkdude we did some recent performance tests and the clojure-lsp graalvm one is also considerably faster than JVM one besides memory and startup-time

cfleming 2025-07-26T05:06:50.426629Z

Yes, this is a bug, I'm going to look at that next.