“莱宁根” Mac OS X 上的相关命令太慢
我安装并运行 lein,但它在我的 Mac (10.6.4) 上似乎很慢。
运行“time lein help”让我
real 11m8.674s user 0m54.297s sys 1m32.621s
再次尝试。
real 15m25.560s user 1m36.087s sys 2m52.745s
这有什么问题吗?有人遇到类似的问题吗?有什么办法可以检查一下是什么问题吗?
添加
当我安装时,我使用了“sudo lein deps”,因为使用“lein deps”时出现了一些错误。我猜这导致了访问文件时出现一些问题。当我运行“sudo lein SOMETHING”时,它照常工作。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
需要注意的一件事是它将把 src 目录放在类路径上。如果你像我一样从 $HOME 运行它并且有一个 54GB 的 ~/src 目录,那么 JVM 会在尝试查找基本内容时速度慢得像爬行一样。
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.
这是因为它如何寻找钩子。解释如下:http://groups.google.com/group/clojure/ browser_thread/thread/e04ab3f6e17f85c4。
你可以尝试一下cake。它对于我的简单项目.clj 来说是开箱即用的,无需任何更改,并且由于它使用持久的 JVM,速度非常快。
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.
找到解决方案
sudo lein 使用与 lein 不同的 CLASSPATH。我猜我的 CLASSPATH 包含 clojure 或 clojure-contrib 与 lein 冲突。
当我在 lein 的第 126 行添加这段代码时,问题就消失了。
对于卸载/安装,我在此处询问并得到了答案。
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.
For uninstalling/installing, I asked and got an answer here.