X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org From: "David Tazartes" To: In-Reply-To: <4A9EA9D5.2070000@bopp.net> Subject: RE: Simple bash script is slow to execute - appears to be time spent starting commands like ls Date: Wed, 2 Sep 2009 14:01:55 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: X-ELNK-Trace: 5bf265d7c89f1e8e1aa676d7e74259b7b3291a7d08dfec7993117630c528c39ebdb4c54ae5c25ca4350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Jeremy Bopp wrote: While I believe the usual forking performance issue is probably the largest factor for your problem, you *are* running an instance of Windows Explorer. It's displaying your desktop which as you indicate above is holding the folder containing your work area. My guess is that you're seeing those usage spikes because of that fact. Try working in a tree which is outside of your desktop, maybe in /tmp, and see if that makes any difference for you. I can't reproduce the slowness you're seeing in general however, even in a directory on the desktop, but then I'm running with XP rather than Vista. ----- This is a good suggestion, but it didn't make a noticeable difference. 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. I've also confirmed these results on my work PC. It's much faster than my laptop (120 ms vs 800 ms) but it's still much slower than the 2-6 ms I get on the server. Thanks, David -- 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