[RFC] case sensitivity on Windows
John Arbash Meinel
john at arbash-meinel.com
Fri Oct 31 13:54:28 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar