This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Processing A Script Too Slow under Cygwin


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to ilak1008 on 5/28/2007 7:16 AM:
> In fact, my script process a file about 5 sec under SFU while under Cygwin,
> it takes about 30 sec or longer.  I wish to continue using Cygwin. 

Cygwin is an emulation layer.  By its very nature, it is inherently slower
than running things natively, because it is an emulation layer.  A 6x
slowdown is probably extreme, but without knowing why you are getting such
a slowdown, we have to assume that it is because your script is doing some
fork-heavy manipulation.

> Therefore, is there a better way to make the processing faster without the
> need of optimizing my script?  

Without knowing what your script does, and without profiling it to know
where the hotspots are, there is nothing we can do.  You own your script;
you should profile it.  One thing that will improve any script's speed is
using shell builtins instead of forking external processes.  If you are
willing to use non-portable bash-isms, there is much speed to be gained
this way.  And if you really want our help, then post code samples so that
we can offer advice on constructs that can be replaced by shell builtins.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGWtf384KuGfSFAYARAs3NAJ9Fj6pHjp6b3SqgAI0wp6WkFFwaNACePB9u
HftqtuEAhaQgwtoFtqrgVUc=
=pi/K
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]