Message139508
I think the question is: will the slowdown apply to module import, or only to explicit uses of the marshal module? If the latter, then I think we can live with it - we discourage using marshal as a general-purpose serialization scheme anyway.
As for the patch:
- why do the tests have to carry a large chunk of binary data? if some data is needed, at least it would be nice if it were kept small
- not sure either why it needs zlib and base64; just use the repr() of the bytestring
- "assertEqual = self.assertEqual" is more of a nuisance than anything else; you're making the code more complicated to read just to save a few keystrokes; same for "assertIsInstance = self.assertIsInstance"
- can you add a comment next to the fields you're adding to the marshal C struct?
- if the "r_byte" macro isn't used anymore, it should be removed, not commented out
- in r_string(), what happens if PyBytes_Check(data) is false? there should probably be a TypeError of some sort
- in r_string() again, if data is NULL after the read() call, the exception shouldn't be shadowed by an EOFError
- why do you call read(1) at the beginning? it seems to make the code more complicated for no useful purpose |
|
Date |
User |
Action |
Args |
2011-06-30 18:22:22 | pitrou | set | recipients:
+ pitrou, georg.brandl, vinay.sajip, amaury.forgeotdarc, grubert, benjamin.peterson, djc, Arfrever |
2011-06-30 18:22:22 | pitrou | set | messageid: <1309458142.65.0.160576633248.issue12291@psf.upfronthosting.co.za> |
2011-06-30 18:22:22 | pitrou | link | issue12291 messages |
2011-06-30 18:22:21 | pitrou | create | |
|