X-Spam-Check-By: sourceware.org Message-ID: <465AD7F7.9020307@byu.net> Date: Mon, 28 May 2007 07:24:07 -0600 From: Eric Blake User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, ilak1008 AT yahoo DOT com Subject: Re: Processing A Script Too Slow under Cygwin References: <10832118 DOT post AT talk DOT nabble DOT com> <10836107 DOT post AT talk DOT nabble DOT com> In-Reply-To: <10836107.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com -----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 AT byu DOT 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/