homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author v+python
Recipients David.Sankel, amaury.forgeotdarc, christian.heimes, christoph, davidsarah, ezio.melotti, hippietrail, lemburg, mark, pitrou, santoso.wijaya, ssbarnea, terry.reedy, tim.golden, tzot, v+python, vstinner
Date 2011年03月26日.01:45:11
SpamBayes Score 4.268928e-07
Marked as misclassified No
Message-id <1301103912.62.0.305766548059.issue1602@psf.upfronthosting.co.za>
In-reply-to
Content
David-Sarah said:
In any case, given that the buffer of the initial std{out,err} will always be a BufferedWriter object (since .buffer is readonly), it would be possible for the TextIOWriter to test a dirty flag in the BufferedWriter, in order to check efficiently whether the buffer needs flushing on each write. I've looked at the implementation complexity cost of this, and it doesn't seem too bad.
So if flush checks that bit, maybe TextIOWriter could just call buffer.flush, and it would be fast if clean and slow if dirty? Calling it at the beginning of a Text level write, that is, which would let the char-at-a-time calls to buffer.write be fast.
And I totally agree with msg132191 
History
Date User Action Args
2011年03月26日 01:45:12v+pythonsetrecipients: + v+python, lemburg, terry.reedy, tzot, amaury.forgeotdarc, pitrou, vstinner, christian.heimes, tim.golden, mark, christoph, ezio.melotti, hippietrail, ssbarnea, davidsarah, santoso.wijaya, David.Sankel
2011年03月26日 01:45:12v+pythonsetmessageid: <1301103912.62.0.305766548059.issue1602@psf.upfronthosting.co.za>
2011年03月26日 01:45:12v+pythonlinkissue1602 messages
2011年03月26日 01:45:11v+pythoncreate

AltStyle によって変換されたページ (->オリジナル) /