Fork me on GitHub
#clj-kondo
<
2019-08-01
>
jose07:08:58

hi, I was thinking about clj-kondo and editor integration, and I'd like to know if there is any performance difference between the graal version and the jvm version (running is a repl)

jose07:08:21

For example, I think that if you have a project with multiple fies, the graal version needs to scan all the files every time you invoke it. While if clj-kondo is running in a repl and called from your editor, in theory it could do some caching, since the editor can tell what files changed.

jose07:08:39

I saw in the project readme that is possible to create a cache, but I guess (correct me if I'm wrong) that anyways you need to check the timestamps for all the files in your project

borkdude07:08:27

@jlle when using clj-kondo with an editor, you first create a cache. after that, your editor incrementally lints files and this also updates the cache

borkdude07:08:10

so when you change a function in namespace A and go to namespace B where that function is called, you will immediately see an arity error for example

jose07:08:15

ok, so it should not matter if I run the graal or the jvm version

borkdude07:08:49

I prefer the GraalVM version for editors, so I can already see things when I don't even have a REPL

jose07:08:42

thanks for clarifying it, in that case I also prefer the graalvm version 🙂

jvtrigueros19:08:05

I've been doing Clojure for a while and I constantly write (not (empty? coll)) instead of (seq coll) (as suggested by clj-kondo), does anyone have a link for the rationale? I'd like to write more idiomatic Clojure, but also want to understand why 🙂

sashton19:08:05

I guess the thinking is (not (empty? coll)) becomes (not (not (seq coll))). So just use (seq coll) instead.