[MERGE] sha_file_by_name using raw os files; -Dhashcache

John Arbash Meinel john at arbash-meinel.com
Sat Oct 6 17:04:19 BST 2007


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

Martin Pool wrote:
> I thought about using mmap or a subprocess, but was dissuaded for the
> moment by portability.  On some unixes mmap is much more restricted on
> Linux (eg you can crash if the file is truncated while you're reading
> it).  On Windows running sha1sum in a subprocess is probably slower.
> It's quite possible but this just seemed like an incremental
> improvement.
> 

Well, as both were slower (mmap ~10%, subprocess about 15x slower), there
really is no question. mmap *might* be faster in an extension. But probably not
enough to justify it.

Also, how did you realize we were double buffering? strace checking? Or just a
good hunch?

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHB7ICJdeBCYSNAAMRAnoMAJwMZPk8CBdcZ+NCkPSQgu4oHnUbqACfVRst
tOx6VRGmJ78fUh79Wd4yWL4=
=yOSZ
-----END PGP SIGNATURE-----



More information about the bazaar mailing list