[MERGE][#230567] Faster (local) branch

Andrew Bennetts andrew at canonical.com
Thu May 29 02:20:31 BST 2008


Aaron Bentley wrote:
> Ian Clatworthy wrote:
[...]
> > 
> > Fair enough. Right now, we're chmod'ing each file where executable
> > is not None. I changed this to only set the mode is it was True.
> 
> AFAIK, that's not accurate.  Without further data, you don't know
> whether the execute bit is being set on newly-created files.

Wow, really?  What platform/filesystem/environment creates new files with the
execute bit set but also lets you unset it afterwards?  Is this a Windows issue?

> > Even with hundreds of executable bits set in the mozilla repo, the
> > time drops from 5% of a big number (24 secs) to < 1% of a smaller
> > number (15 secs). I can update the TODO if you like.
> 
> Hmm.  I can't seem to find that old branch.  But the basic strategy was
> to use os.open instead of the builtin open.  os.open allows the
> permissions to be specified at file creation time, so that we only have
> to do one syscall, and can skip the chmod.

That sounds sane to me if we really do need this degree of control over file
creation.

-Andrew.




More information about the bazaar mailing list