[PATCH] faster initial commit due to buffered logging
robertc at robertcollins.net
Wed May 30 00:11:35 BST 2007
On Mon, 2007-05-28 at 21:59 +1000, Ian Clatworthy wrote:
> I don't believe stderr vs stdout is the issue - it's ~/.bzr.log. When I
> replaced the call to bzrlib.note with sys.stderr.write, the performance
> increase was dramatic leading me to the patch submitted. Writing to
> sys.stdout might be slightly faster again but either way, dropping the
> logging to ~/.bzr.log is a "semantic" change I was hoping to avoid.
Logging stuff to ~/.bzr.log should be done where we think it will help
debug problems. Specifically in this case, the actions are already
logged to the console, so there is no need to also log them to
~/.bzr.log. I suggested switch to stdout because that will:
- remove the ~/.bzr.log output
- make commit more amenable to redirection
- put what is arguably the expected output of commit - the things its
doing - into stdout.
> simply caching the 'added' messages, all the writes to ~/.bzr.log happen
> at once. The other nice thing about buffering the add messages is that
> the progress bar is actually useful now.
I like making the progress bar useful, but I dont think we need the
complexity of your explicit buffering; rather lets just not write to
~/.bzr.log per-file-added. Also, the right place to buffer ~/.bzr.log,
if we choose to do that, would be in the file itself: that way you wont
change the ordering of things output to the file from different places
in bzrlib, which would be a semantic change with confusing side effects.
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070530/62392d00/attachment.pgp
More information about the bazaar