Comments (16)
hi Aero,
which version are you using? If 0.12.0 (latest released) can you please retest with master head?
from clj-refactor.el.
xeno@xenocorp:~/.emacs.d% ls elpa/clj-refactor-20140330.651
So, from today?
from clj-refactor.el.
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?
from clj-refactor.el.
That is the whole namespace.
from clj-refactor.el.
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).
from clj-refactor.el.
when I run it it is practically instant. I get
(ns payments.schema_test
(:require [clojure.test :refer :all]))
which makes sense.
from clj-refactor.el.
@expez does it slow down in your environment as well with only the ns declaration in the file?
from clj-refactor.el.
@expez no, it's fast with just that ns in a file. The file is "only" 359 lines long.
from clj-refactor.el.
@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.
from clj-refactor.el.
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.)
from clj-refactor.el.
@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?
from clj-refactor.el.
@benedekfazekas Unfortunately, no, I can't really send the whole file. It's gonna be hard to anonymise it.
from clj-refactor.el.
@AeroNotix If cljr isn't already bytecompiled doing that might get you a ~2-5x speedup.
from clj-refactor.el.
@expez s I tend to avoid byte compilation, but it's certainly worth a try! Thanks.
from clj-refactor.el.
good call @expez, thx ;)
also diff approach to clj source mentioned in #11 (eg build an AST) can change this land. but only wild guessing here...
from clj-refactor.el.
there is a performance tweak now in the latest version if u use refactor-nrepl
with it. search is done in an AST by clojure instead of the buffer by elisp. enjoy
from clj-refactor.el.
Related Issues (20)
- cljr-clean-ns erroneously removes :as-alias in clj namespaces HOT 1
- Document (or remove) pkg-info dependency HOT 6
- `cljr-sort-project-dependencies` drop :dependencies section when using managed-dependencies HOT 2
- cljr-slash magic require js/ behavior is determined by file type, not language context HOT 2
- cljr--ns-alias-at-point does not handle quasiquote, sharp-quote and dotted aliases HOT 1
- Combine cljs and clj namespace alias candidates for magic requires HOT 15
- Ability to specify context in `cljr-magic-require-namespaces` HOT 4
- Create cljr-slash variant that uses the `suggest-libspecs` middleware op HOT 9
- `cljr--point-in-reader-conditional-branch-p` may block and is incorrect HOT 1
- Question: how to install `clj-refactor` via `use-package` declaration instead of imperative `package-install`? HOT 2
- Enhancement: trying to install and configure `clj-refactor` with the declarative `use-package` instead of imperative `package-install` HOT 1
- cljr-add-project-dependency throws `java.io.EOFException` HOT 6
- `cljr-rename-symbol` not working properly when narrowing is in effect HOT 2
- cljr-slash breaks whenever there's a Unicode character used as an alias in a codebase HOT 3
- cljr-add-project-dependency document support for deps.edn HOT 1
- Add Emacs 28, 29 to test matrix
- Add `eldev lint` to the CI
- Some refactorings are not working via TRAMP HOT 2
- Add support for updating :sha in :git/url dependencies HOT 3
- Error with suggest_libspecs HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clj-refactor.el.