[MERGE/RFC] Flush .bzr.log periodically

John Arbash Meinel john at arbash-meinel.com
Fri Jan 9 15:55:38 GMT 2009


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

Martin Pool wrote:
...

> Given that, we can bear to do a bit more work in the mutter function,
> like checking the time.  In fact you could even change it back to using
> line buffering, if that's more useful, and if it turns out not to have a
> noticeable cost.

Well, we already were calling "time.time()" because we were adding the
time-since-startup to the log.

I agree that we mostly got rid of the big dumps of information to
~/.bzr.log, though I think we still dump the name of every file added,
so on *big* initial add + commit, it probably gets a lot of stuff written.

> 
> But I was pretty sure from looking at -Dhpss output on Linux that in
> fact it was line buffered, or not too far from it.  You can see them
> in nearly real time.
> 

Yeah, under Linux I never really felt like things were "pending" being
written to the log file. I got the impression the buffering was actually
being done at the Kernel layer, which means it could be shared between
processes, and also that if you kill a process, the stuff written so far
would still be written to disk. And also, I found it to be quite
different on Windows. Where I'm sure early termination does not flush
the buffer, and things are pending to be written. Because if you read
the log file, you'll get lines that are truncated until the next write.
(and if you have multiple processes, they will be interleaved at points
other than proper line-boundaries.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklnc3oACgkQJdeBCYSNAAN+SACgwsZR5c5hLkS6rhZYJXb2Oa/X
1lMAn3i4OJRSwNsJuCZNdj0xY1IE53tA
=gwob
-----END PGP SIGNATURE-----



More information about the bazaar mailing list