Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

file stat is very very slow on Win32

8 views
Skip to first unread message

Uwe Traum

unread,
Dec 20, 2000, 10:50:20 AM12/20/00
to
Using file stat ion every file in very large directories (2000 files) under
winnt is unusable. (> 20 min)

Under UNIX it takes only half a minute for the same.
(And thats an old machine !)

I looked into the C-Code and wondered why FindFirstFile is used
at this place. In another C-Application we use GetFilesAttributesEx
for the same purpose and thats very fast. I think it gives all
Information we need for an replacement for stat.


--
Uwe Traum
ibb Grafische Datenverarbeitung
tr...@ibbgdv.de

vincen...@my-deja.com

unread,
Dec 21, 2000, 5:56:39 AM12/21/00
to
In article <qfkq19...@router1.ibbgdv.de>,

Uwe Traum <tr...@ibbgdv.de> wrote:
> Using file stat ion every file in very large directories (2000 files)
under
> winnt is unusable. (> 20 min)
>
> Under UNIX it takes only half a minute for the same.
> (And thats an old machine !)
>
> I looked into the C-Code and wondered why FindFirstFile is used
> at this place. In another C-Application we use GetFilesAttributesEx
> for the same purpose and thats very fast. I think it gives all
> Information we need for an replacement for stat.

Why don't you make the necessary changes to this code, check that it
passes all tests, and submit it as a patch on sourceforge? I was also
wondering why that code needs to call FindFirstFile.

Note that TIP#17 (http://www.scriptics.com:8080/cgi-bin/tct/tip/) also
includes some changes to Tcl's filesystem which will improve
performance (although not necessarily for the example you give).

Vince.


Sent via Deja.com
http://www.deja.com/

Jeffrey Hobbs

unread,
Dec 31, 2000, 7:12:57 PM12/31/00
to
<vincen...@my-deja.com> wrote in message
news:91snl5$s5b$1...@nnrp1.deja.com...

> In article <qfkq19...@router1.ibbgdv.de>,
> Uwe Traum <tr...@ibbgdv.de> wrote:
> > Using file stat ion every file in very large directories (2000 files)
> under
> > winnt is unusable. (> 20 min)
> >
> > Under UNIX it takes only half a minute for the same.
> > (And thats an old machine !)
> >
> > I looked into the C-Code and wondered why FindFirstFile is used
> > at this place. In another C-Application we use GetFilesAttributesEx
> > for the same purpose and thats very fast. I think it gives all
> > Information we need for an replacement for stat.
>
> Why don't you make the necessary changes to this code, check that it
> passes all tests, and submit it as a patch on sourceforge? I was also
> wondering why that code needs to call FindFirstFile.

Remember that when Tcl was first ported, it had to work all the way
back to Win3.1 (16-bit system). It was coded at that time to not
have 3 different ways to do things on the various Windows flavors
when it could be avoided (which wasn't always). I only removed the
16-bit support in 8.3, but this may be a remnant of that that wasn't
clearly specified. I believe there are numerous remnants such as
these that could be improved (also in Tk). Please help us in hunting
down and eradicating these!

Jeff


0 new messages