Differences for win32 versus Linux open() performance
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 5 20:45:01 BST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm working on profiling initial commit performance. I ended up creating
a tree that has all the files of mysql, but without any content. It
still took ~9s to commit.
So I started digging further, and I found that *just*:
open(fname, 'rb').close()
For 7k files takes 3.6s on win32. On a much older linux sytem, it only
takes 0.6s. I assume this is the issues with opening a file locks its
path, etc.
Anyway, I was pretty shocked to see the pure overhead of open() be so
high. Though it also explains why the time of 'bzr selftest' is so much
slower.
Note, I even tried to go to os.open() and win32file.CreateFile to see if
it was possible to be faster. (nope)
I wasn't even able to cheat with the chdir() tricks we used for readdir.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkopdb0ACgkQJdeBCYSNAAMx/gCffaxXZIcwd1aU3FulT4UN78DK
OcoAnAnrGrFLXZ5oeAeARWq3DtG/blwT
=9fO3
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list