sys.stderr very slow
Martin Pool
mbp at canonical.com
Fri Nov 10 07:03:02 GMT 2006
On 2 Nov 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> It seems that writing to sys.stderr is much slower than at least I
> thought it would be.
That's interesting to know.
> Now, this was using the "DotsProgressBar" which effectively calls
> sys.stderr.write('.') for every update() call. I thought the penalty is
> because sys.stderr is unbuffered, so it forces a flush on every write,
> which updates the screen, etc. (Though in this case it was re-directed
> to a file).
Should we just remove (or not use) DotsProgressBar then? If there's no terminal, or
not enough of one to draw a progress bar then there's a good chance
there's no user watching, or that they won't be able to see the output.
Anyhow, +1 for your patch if you want it.
--
Martin
More information about the bazaar
mailing list