[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is there a lua module just like GNU's find?
- From: Joshua Jensen <josh.jjensen@...>
- Date: Sat, 17 Dec 2011 09:16:46 -0700
----- Original Message -----
From: Dimiter 'malkia' Stanev
Date: 12/16/2011 12:00 PM
There is a way to read the directory in just 2-3 kernel calls. (A
little more if the directory is bigger, and provided buffer is not
enough). I can't tell whether it's faster, but it's out there.
This is very cool. If it is faster (and it has the logical appearance
of being so), then applications could detect the Windows platform and
choose to use it on Vista  and above.
FYI: It's doing more that it's supposed to do, for example two times
|| !GetFileInformationByHandleEx(h, (FILE_INFO_BY_HANDLE_CLASS)i,
but this was just to explore how the functions were behaving, and
whether they were filling the buffer to the end.
Only one call is needed there.
I wonder if Git's scanning internals could be sped up with this...?