GithubHelp home page GithubHelp logo

Comments (16)

benedekfazekas avatar benedekfazekas commented on July 29, 2024

hi Aero,

which version are you using? If 0.12.0 (latest released) can you please retest with master head?

from clj-refactor.el.

AeroNotix avatar AeroNotix commented on July 29, 2024

@benedekfazekas

xeno@xenocorp:~/.emacs.d% ls elpa/clj-refactor-20140330.651

So, from today?

from clj-refactor.el.

benedekfazekas avatar benedekfazekas commented on July 29, 2024

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.

AeroNotix avatar AeroNotix commented on July 29, 2024

That is the whole namespace.

from clj-refactor.el.

expez avatar expez commented on July 29, 2024

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.

benedekfazekas avatar benedekfazekas commented on July 29, 2024

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.

benedekfazekas avatar benedekfazekas commented on July 29, 2024

@expez does it slow down in your environment as well with only the ns declaration in the file?

from clj-refactor.el.

AeroNotix avatar AeroNotix commented on July 29, 2024

@expez no, it's fast with just that ns in a file. The file is "only" 359 lines long.

from clj-refactor.el.

expez avatar expez commented on July 29, 2024

@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.

AeroNotix avatar AeroNotix commented on July 29, 2024

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.

benedekfazekas avatar benedekfazekas commented on July 29, 2024

@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.

AeroNotix avatar AeroNotix commented on July 29, 2024

@benedekfazekas Unfortunately, no, I can't really send the whole file. It's gonna be hard to anonymise it.

from clj-refactor.el.

expez avatar expez commented on July 29, 2024

@AeroNotix If cljr isn't already bytecompiled doing that might get you a ~2-5x speedup.

from clj-refactor.el.

AeroNotix avatar AeroNotix commented on July 29, 2024

@expez s I tend to avoid byte compilation, but it's certainly worth a try! Thanks.

from clj-refactor.el.

benedekfazekas avatar benedekfazekas commented on July 29, 2024

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.

benedekfazekas avatar benedekfazekas commented on July 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.