[MERGE] Streamline _walkdirs_utf8 for utf8 file systems, reducing time to traverse a mozilla tree from 1s to .6 seconds. (Robert Collins)

John Arbash Meinel john at arbash-meinel.com
Wed Sep 10 20:46:45 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
...

>> And in 'readdir.h':
>> #undef st_mtime
> 
> Won't work, we can't access the st_mtime field of struct stat if we do
> that because it doesn't exist anymore. (Look at __USE_MISC in
> bits/stat.h).
> 

Ah, I see your point... craziness.

>> Also, regardless I think it would be good to unify our extension "_Stat" objects.
> 
> Agreed.
> 
...

>> 2) Clean up types. Use Py_ssize_t for python API's, 'off_t' for stat objects, etc.
> 
> Well, I used the same types you did for stat objects on windows, if
> we're unifying them it seems strange to change. As for python api's, the
> C code is correct, the types just hint what magic pyrex should invoke to
> get values from python on auto conversion. Happy to change specific
> issues, but I can't tell a-priori which ones you spotted.

Actually, for _Win32Stat I use "double" for the time members (mtime,
ctime, atime) and I use a 64-bit integer for st_size. From what I see,
you use time_t and a plain int for your _Stat object.

For you 'struct stat' you also use plain 'int' types, which I think is
incorrect (things like off_t for the file size are actually 64-bit
integers.)

It doesn't effect a lot of the compiled code, because it will use the
right objects, but it *will* effect the Pyrex conversion. (pyrex
converts a 64-bit integer into a PyLong, rather than a PyInt.)

...

> I'm off today and tomorrow, so if someone wants to just whip through and
> do the things we've agreed on here, that would be grand.
> 
> -Rob

I'll see if I can get to it, though it seems my stack of stuff to get to
keeps growing. Enjoy your time off.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjIJCUACgkQJdeBCYSNAAN6PQCeI04Qn0YYtmJVp+CCh98AuECQ
ibIAoL/zUSj2oYJGOLzvNaEmPCIBe5TA
=o+zw
-----END PGP SIGNATURE-----



More information about the bazaar mailing list