-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cljr-slash is very slow #230
Comments
Always or only the first time? It builds up a cache the first time this command is called. Parsing all namespaces in the project to find the most likely candidates can obv take some time i large projects. |
@expez just verified that in .clj files it is actually fast as expected, but in .cljs and .cljc files it is always slow. |
Maybe the cache isn't working as it should for those dialects. Thanks for investigating. |
I wonder if addressing this one would be a matter of parallelising the workload (hypothesis: cljs workloads tend to be larger for some reason, hence the performance difference) If accepted, the same technique suggested in #246 could be applied here. |
If it's fast in clj files but slow in the other, then it's most likely an issue with the caching. Even if the workload on a cljc file is larger, it should only be performed once. From there on only the files that have been modified are re-examined. |
I self-assigned this one IME cljr-slash is generally fast for .clj, for not so much for very large codebases where I experienced completion times of up to 7s. Parallelizing it fixed it No idea about .cljs, will review as well |
I use this as at work on a clojure codebase that's ~100kloc. I've never experienced it being slow, not even prior to the cache warming up.
Glad to hear this made it a lot faster! Did you see if the caching was broken, though? |
That's weird, the biggest codebase I work on has a comparable size.
Will check it as part of this task |
(note to self, mostly) On caching, there's no difference between the clj and cljs paths. However one can observe that the caching is based on So a plausible hypothesis is that in cljs usages, the build system, compilation model or other usage patterns render lastModified ~useless. So there would be a couple lines of investigation:
|
I have a good reason to believe the cljs part of the problem will be solved by #328 : #328 stops inspecting folders such as |
Expected behavior
Typing a
/
is fastActual behavior
Typing a
/
makes emacs hang every time for about 0.5 to ~1 second.Steps to reproduce the problem
/
in clojure fileEnvironment & Version information
spacemacs (current develop branch)
clj-refactor.el and refactor-nrepl version information
clj-refactor 2.4.0-SNAPSHOT (package: 20180708.57), refactor-nrepl 2.4.0-SNAPSHOT
CIDER version information
Emacs version
GNU Emacs 26.1 (build 1, x86_64-apple-darwin17.5.0, NS appkit-1561.40 Version 10.13.4 (Build 17E199)) of 2018-05-28
Operating system
macOS 10.13.6
Profiler
The text was updated successfully, but these errors were encountered: