X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4A9EB7E9.9030508@bopp.net> Date: Wed, 02 Sep 2009 13:22:33 -0500 From: Jeremy Bopp User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Simple bash script is slow to execute - appears to be time spent starting commands like ls References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 David Tazartes wrote: > Let's say we focus on the echo | cut slowness I mentioned earlier. This is > independent of the CWD and doesn't cause the explorer.exe spike but is still > 200 times slower on my Vista laptop than on a low-powered Linux server. If > we correct this problem, I'm pretty confident the time per loop will go way > down. How about we try to boil this down a little further? Try running the following on your various systems and compare the results: time for n in $(seq 1 10000); do true; done I'm hopeful that this should help eliminate IO as a bottleneck in your comparisons. Maybe someone else has a better suggestion. If you still see a difference in performance of a similar magnitude as you do with the echo | cut case, this might argue for fork being your problem. I can't say whether or not what you're seeing is really expected for fork though. All I know is that fork is fairly slow in Cygwin. If it turns out that IO is the issue, I don't think I'll be much help, not that I'm much help to begin with here. ;-) It's also possible that you have BLODA on your laptop which could be interfering in some way. I think cygcheck is able to identify some of them for you. The problem reporting guidelines (http://cygwin.com/problems.html) contain information for running cygcheck which may help others identify typical problems. -Jeremy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple