[RFC] case sensitivity on Windows
Alexander Belchenko
bialix at ukr.net
Fri Oct 31 14:03:13 GMT 2008
John Arbash Meinel пишет:
> Alexander Belchenko wrote:
>> Paul Moore пишет:
> ....
>
>>> Just a brief note here - I did some similar code for Mercurial, and I
>>> found that actually, using os.listdir plus cacheing the results (so
>>> that I didn't call os.listdir more than once per directory) was
>>> actually faster than using win32 FindFile calls.
>> I'm very surprised about this moment, because internally os.listdir uses
>> FindFile Win32 API. Perhaps this overhead added by pywin32 wrapper?
>
>
> I think it is more about "caching the results" and working "one
> directory at a time". I would guess that if he was directly calling
> FindFile, then he would be calling it for every path separately.
>
> And so the overhead is in making 50 calls for 50 files in one directory,
> versus 1 call for 50 files.
OK, and then you need to find out need file by comparing "canonical" (lower-cased)
form, I guess. I suggested to use lowercased "canonical" names in my spec draft.
More information about the bazaar
mailing list