This is the mail archive of the cygwin-developers@cygwin.com 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]

Re: cygwin slowdown in current cvs version


On Sun, 2001-09-09 at 10:16, Christopher Faylor wrote:
> On Sun, Sep 09, 2001 at 10:13:06AM +1000, Robert Collins wrote:
> >On Sun, 2001-09-09 at 06:44, Christopher Faylor wrote:
> >> On Sat, Sep 08, 2001 at 10:23:26PM +0200, Corinna Vinschen wrote
> >> 
> >> If we were going to do that, though, we should set up one global "change
> >> notification" handle for /etc/group and /etc/passwd, right?
> >
> >After a quick MSDN scan, I couldn't see any per file scanning mechanism.
> >which means notification on /etc is about it (barring fancy tricks like
> >/etc/changingdata/passwd and /etc/passwd->changindata/passwd :])
> 
> A google search reveals some undocumented calls that allow you to track
> all sorts of things.
> 
> After a little more testing, it seems like the slowdown is actually due
> to the FindFirstChangeNotification call.  If I add that and avoid the
> WaitForSingleObject, I still get a noticeable slowdown.

mm, let me see.. that FindFirstChangeNotification should only get called
once in each process? It sounds like you are saying that having called
it, everything slows down - but that doesn't sound right to me. Explorer
uses this all the time, for every open window, and it's still
responsive.

I have an idea though: what if change notifications are queueing?
ie 
 else if (hchanged && WaitForSingleObject (hchanged, 0) ==
WAIT_OBJECT_0)
       {
       (void) FindNextChangeNotification (hchanged);
     while (WaitForSingleObject (hchanged, 0) == WAIT_OBJECT_0)
         (void) FindNextChangeNotification (hchanged);

      small_printf ("/etc changed\n");
if (fstat(...))
       state = uninitialized;
        }


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