Fork me on GitHub
#cider
<
2024-07-02
>
oskarkv23:07:10

I don't know if this is the right place to ask, but why is renaming a symbol with clj-refactor so unusably slow? My project is like 1000 lines, and after 2 minutes I got tired of waiting for it to analyze my project. I might have an old version, though. Is there a way to make it faster? Maybe I'm doing something stupid.

vemv11:07:31

I might have an old version, thoughYou should start from there 😄 modern versions have misc parallelism and caching. Although for the analysis phase, most likely it hasn't changed much. The reason for this performance is that we use https://github.com/clojure/tools.analyzer - it is what it is. However once the cache is built. Subsequent usages are cached or incrementally computed.

vemv11:07:09

tbh nowadays I don't use that specific part of clj-refactor / refactor-nrepl. I don't use LSP either which is known to perform well. With modern naming (no refers, https://stuartsierra.com/2015/05/10/clojure-namespace-aliases :as prefixes) search/replace can be done by sed or the like

oskarkv11:07:13

I use some refers 🙂 But yeah, that might work.

vemv11:07:34

Same 😇