Message127115
> * The read*() methods are implemented very inefficiently. Since they
> have to deal with the bytes objects returned by
> BZ2Decompressor.decompress(), a large read results in lots of
> allocations that weren't necessary in the C implementation.
It probably depends on the buffer size. Trying to fix this /might/ be
premature optimization.
Also, as with GzipFile one goal should be for BZFile to be wrappable in
a io.BufferedReader, which has its own very fast buffering layer (and
also a fast readline() if you implement peek() in BZFile).
> * Fixed a typo in test_bz2's testReadChunk10() that caused the test to
> pass regardless of whether the data read was correct
> (self.assertEqual(text, text) -> self.assertEqual(text, self.TEXT)).
> This one might be worth committing now, since it isn't dependent on
> the rewrite.
Ah, thank you. Will take a look. |
|
Date |
User |
Action |
Args |
2011-01-26 13:33:07 | pitrou | set | recipients:
+ pitrou, rhettinger, niemeyer, wrobell, nadeem.vawda, eric.araujo, MizardX, antlong, xuanji |
2011-01-26 13:33:06 | pitrou | link | issue5863 messages |
2011-01-26 13:33:06 | pitrou | create | |
|