Fork me on GitHub
#leiningen
<
2015-12-09
>
ag04:12:56

I know I’m not the first one asking this: but I feel something definitely not right on my machine. lein repl startup time not just slow. it’s painfully, unacceptably slow. I’ve tried all sorts of things. nothing seems to be helping. are there things that need to/can be done on os x?

seancorfield05:12:12

Do other Java command line programs run quickly for you?

seancorfield05:12:40

Do you see slow lein repl inside a project? Outside a project?

seancorfield05:12:21

Do you have anything in your ~/.lein/profiles.clj file?

ag05:12:17

@seancorfield: I’m trying to load repl without lein. How can I do that if I installed clojure through installing lein via brew?

ag05:12:58

just running lein version by itself takes more than 6 seconds.

ag05:12:36

lein repl (without trampoline) takes >20s.

ag05:12:14

I think it has something to do with my profiles.clj, which looks like this:

{:user {:plugins      [[cider/cider-nrepl "0.11.0-SNAPSHOT"]
                       [refactor-nrepl "1.2.0-SNAPSHOT"]
                       [lein-cljsbuild "1.1.1"]]
        :dependencies [[alembic "0.3.2"]
                       [org.clojure/tools.nrepl "0.2.11"]]}

 :repl-options {
                :nrepl-middleware [io.aviso.nrepl/pretty-middleware]
                }
 }

seancorfield05:12:24

Yeah, that would cause a slow REPL startup. We only put those plugins and dependencies in projects where we want full CIDER functionality etc.

seancorfield05:12:53

Comment that all out and see how fast lein repl comes up.

ag06:12:42

it’s just a bit faster, yet still kinda slow

seancorfield06:12:39

So lein repl outside a project with all your ~/.lein/profiles.clj commented out is still slow? That is odd. Is it faster if you do lein -o repl (to run offline).

ag06:12:25

yep.. still slow…

ag06:12:33

I just did this

java -cp ~/.m2/repository/org/clojure/clojure/1.7.0/clojure-1.7.0.jar clojure.main

ag06:12:52

and it took less than 1.5s

ag06:12:03

but lein is still damn slow

ag06:12:05

wow.. I just tried removing ~/.m2 completely and then run lein repl it seems to be tiny bit faster. yet still a lot slower than just running it directly

seancorfield06:12:42

Sorry, I'm at a loss. Maybe asking on the Clojure Google Group will yield a more helpful answer?

ag07:12:40

It’s ok… thank you for digging into that for me.

ag07:12:49

I’m just wondering what if I create an alias and run repl in terminal directly through java or even drip. would it be wrong?

ag07:12:32

and cider would use lein, when I jack-in