简体   繁体   中英

'leiningen' related commands too slow with Mac OS X

I installed and run lein , but it seems to slow on My Mac (10.6.4).

Running 'time lein help' gives me

real    11m8.674s
user    0m54.297s
sys 1m32.621s

I tried once more.

real    15m25.560s
user    1m36.087s
sys 2m52.745s

What's wrong with this? Is anyone experiencing similar problem? Is there anyway to check what's the problem?

Added

When I install, I used 'sudo lein deps', as I got some errors using 'lein deps'. I guess it caused some problem accessing files. When I run ' sudo lein SOMETHING', it works as usual.

One thing to note is that it will put the src directory on the classpath. If you run it from $HOME and have a 54GB ~/src directory like I do, the JVM will slow to a crawl just trying to find the basic things.

It's because of how it looks for hooks. It's explained here: http://groups.google.com/group/clojure/browse_thread/thread/e04ab3f6e17f85c4 .

You could give cake a try. It worked out of the box for my simple project.clj without any changes, and is blazing fast because of the persistent JVM it uses.

Found solution

sudo lein uses different CLASSPATH than that with just lein. I guess my CLASSPATH that contains clojure or clojure-contrib conflicted with the lein.

When I added this code at line 126 of lein, the problem is gone.

CLASSPATH="/Users/smcho/.m2/repository/leiningen/leiningen/1.2.0/leiningen-1.2.0-standalone.jar:lib/dev/swank-clojure-1.2.1.jar::src/:"

For uninstalling/installing, I asked and got an answer here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM