[MERGE] Faster LocalTransport.put() and append() methods.
Robert Collins
robertc at robertcollins.net
Fri Jun 9 20:02:54 BST 2006
On Fri, 2006-06-09 at 21:12 +1000, Robert Collins wrote:
> Seeking a +1.
>
> This patch changes AtomicFile to be more targeted at the way we use it,
> rather than a general safe-for-everything tool. It also changes
> LocalTransport.append() to have less syscalls while being no longer.
>
> The combination takes making a kernel_like_tree down from 7.3 seconds to
> 1.5, which makes some benchmarks much more pleasant to run.
>
> This is in my add() branch, where i'm currently fiddling stuff.
Heh, should have run the *full* test suite.
This patch currently breaks on the permission management stuff. Heres
why:
The permission checking logic expects that an explicit mode will
override the umask : if we are configured to force (say) 0666, and the
umask is 022, then just opening the file with mode 0666 results in a
mode of 0644.
I'm not sure what to do with this, except perhaps change the umask
rather than allow per-file-call permission tweaking.
The reason to do this is to get rid of a bunch of python logic and
syscalls which actually adds up to a surprising amount of time.
I dont want to eliminate being friendly to shared-user installs, but I'm
seeking a cheaper way to do so.
I can shuffle the patch to use fchmod with a small C extension I guess,
which will reduce the time somewhat, but I'm rather unkeen on that.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060610/40aaf77c/attachment.pgp
More information about the bazaar
mailing list