delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/03/11:05:43

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
From: "David Tazartes" <davidt81 AT earthlink DOT net>
To: <cygwin AT cygwin DOT com>
In-Reply-To: <4A9ED2C5.1070306@comcast.net>
Subject: RE: Simple bash script is slow to execute - appears to be time spent starting commands like ls
Date: Thu, 3 Sep 2009 11:05:23 -0400
MIME-Version: 1.0
Message-ID: <E1MjDsO-0004DK-9a@elasmtp-masked.atl.sa.earthlink.net>
X-ELNK-Trace: 5bf265d7c89f1e8e1aa676d7e74259b7b3291a7d08dfec79849bfc5eb3006a92226197973a38c0a2350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Larry Adams wrote:

The problem as I see it is Windows.  For example, only 10 iterations 
caused over 65k file and registry reads.  I have attached the output 
from SysInternals Process Explorer for your edification.  The only fix 
for this is Linux.  I still use Windows for development and "LOVE" 
Cygwin.  But Windows can't be fixed.

-----

Wow, this is quite a trace and by far the most helpful post in the entire
Cygwin mailing list about this issue. I've looked it over and one of the
basic problems seems to be the "Application Compatibility" stuff that Vista
helpfully adds and won't let you disable. However, from the rest of the
trace it appears hopeless that a Windows process will ever run in 5 ms like
on Linux even if Application Compatibility were disabled. Windows seems to
just have a different model - small programs aren't how you do things, you
do them with API calls, which is why Windows Scripting Host's programming
model talks to the OS directly.

Another issue seems to be DLL loading - there seem to be a lot of DLL loads
in the trace.

So given that, I wonder if our intrepid Cygwin maintainers could be
convinced to write a kind of compiled bridge that allows for any command in
/bin to also be run in-process with bash.exe using static linking. I can
imagine all kinds of weird things one would have to worry about, like piping
data between processes, forks, etc, but it would conceivably make Cygwin
100x faster on Windows. (Perhaps *any* /bin command is too stringent a
requirement - but the 100 most common ones would be a good start.) I'll
freely admit that I don't have the time, knowledge or inclination to
contribute such a thing, but does anyone else have any interest in doing so?

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019