[Zope-CMF] Re: [CMF] 84/ 2 Accept "Excessive time consumption by "Filesystem
Directory View""
Chris Withers
chrisw@nipltd.com
Tue, 05 Nov 2002 11:05:51 +0000
Dieter Maurer wrote:
>
> The comment in "DirectoryInformation._changed" says that some Windows
> directories do not update the directory modification time for
> new/deleted files.
That comment may be out of date.
> In this case, we cannot rely on modification time and must use
> explicit scanning. "listdir" should be sufficient for this and
> a bit less expensive than "walk".
Ah, okay, if you could make that work I'd be greatful :-)
> > The tests get around this by updating the file in a loop until the modification
> > date changes. Some of the tests were failing even with this :-(
> Hm, almost unbelievable.
Indeed. A lot of print statements convinced me otherwise, IIRC.
> Maybe, "_changed" is called and no reload called for despite "_changed"
> returned 1. A single call to "_changed" resets the state.
Nope, I was actually printing the interger number representing the modification
time and there were situations where it wasn't updating. I think if you delete a
file and maybe if you add one.
> On the other hand, I would not expect that a test, unless explicitly
> designed to generate race conditions, should reveal one.
*shrugs* I wasn't aiming to test any race conditions...
> Lets see what tests fail.
> I will then see whether I can reproduce it here and find out
> the reason.
good luck :-)
Chris