为什么Cygwin的执行shell命令很慢? [英] Why does Cygwin execute shell commands very slowly?

查看:4677
本文介绍了为什么Cygwin的执行shell命令很慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是测试一个非常简单的命令,如:

 而真实的;做的bash -c回声你好; DONE

您会发现在Cygwin的bash的多少慢是。有谁知道为什么吗?

这是一个新鲜的cygwin的1.7 WIN7上安装。

由于Jared的测试的想法,我修改了命令,这(增加的bash -c):

 时间我在{1..10};做的bash -c回声你好; DONE
你好
...
真正0m7.711s //它的问题
用户0m0.091s
SYS 0m0.476s


解决方案

最后,我找到了源头 - 一个名为QQPCMgr RTP服务我的办公室的电脑上运行的服务,它的QQ电脑管家实时保护服务

通过禁用它,在这个问题的脚本时回落到:

 真正0m0.943s
用户0m0.105s
SYS 0m0.231s

我已经告诉QQPCMgr关于这个开发商,希望他们能找到原因。

这仍然比Linux要慢得多,但得到的其他cygwin的电脑相同的实时。

感谢大家!

Just tests a very simple command like:

while true; do bash -c "echo hello"; done

You will find how much slow the bash in Cygwin is. Does anybody know why?

It's a fresh install of cygwin 1.7 on win7.

thanks to Jared's testing idea, I modified the command to this(adds bash -c):

time for i in {1..10} ; do bash -c "echo Hello" ; done
Hello
...
real 0m7.711s //it's the problem
user 0m0.091s
sys 0m0.476s

解决方案

Finally, I found the source - a service named "QQPCMgr RTP Service" running on my office computer, it's the real time protection service of "QQ PC Manager".

By disabling it, the time of the script in the question falls back to:

real    0m0.943s
user    0m0.105s
sys     0m0.231s

I have told the developers of QQPCMgr about this, hope they will find the reason.

This still much slower than Linux, but gets the same "real time" of other cygwin computers.

Thank you all!

这篇关于为什么Cygwin的执行shell命令很慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆