-
Notifications
You must be signed in to change notification settings - Fork 109
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
Requires with lots of refers seems very slow when calling cljr-remove-unused-requires #51
Comments
hi Aero, which version are you using? If 0.12.0 (latest released) can you please retest with master head? |
xeno@xenocorp:~/.emacs.d% ls elpa/clj-refactor-20140330.651 So, from today? |
hm... that seems to be the latest. Can't really reproduce tho. I added some mock fns but just to be sure can you share your whole namespace pls? |
That is the whole namespace. |
Is it slow when you only have that ns in the file? I would expect it to be quite slow with that ns followed by a ton of code (as quite a bit of searching is done). |
when I run it it is practically instant. I get (ns payments.schema_test
(:require [clojure.test :refer :all])) which makes sense. |
@expez does it slow down in your environment as well with only the ns declaration in the file? |
@expez no, it's fast with just that ns in a file. The file is "only" 359 lines long. |
@benedekfazekas I suspect this only occurs when such an ns declaration precedes a few hundred lines of code. Which is why you cannot reproduce the problem. Slowness in such a situation is to be expected, given how much searching is involved in this particular refactoring. |
Closing, then. If it's related to the number of forms there's not much that can be done (assuming the core search algo is efficient.) |
@expez agreed. although there could be something funky in the actual file which the search (regexp) chokes on... I just want to rule this out. so @AeroNotix any chance you can send/attach the whole file? |
@benedekfazekas Unfortunately, no, I can't really send the whole file. It's gonna be hard to anonymise it. |
@AeroNotix If cljr isn't already bytecompiled doing that might get you a ~2-5x speedup. |
@expez s I tend to avoid byte compilation, but it's certainly worth a try! Thanks. |
there is a performance tweak now in the latest version if u use |
This seems very slow when calling cljr-remove-unused-requires.
The text was updated successfully, but these errors were encountered: