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 vinay.sajip
Recipients Arfrever, amaury.forgeotdarc, benjamin.peterson, georg.brandl, vinay.sajip
Date 2011-06-09.16:36:29
SpamBayes Score 1.3322676e-15
Marked as misclassified No
Message-id <1307637390.79.0.756805208673.issue12291@psf.upfronthosting.co.za>
In-reply-to
Content
@Amaury: Re formatting and comment style - I will address this. The diff I posted is to the default branch rather than 3.2, though it won't change the main substance of the patch.

Re. performance and buffering: I agree this could have an impact (although strings are not actually read a byte at a time), but it's not easy to address because even if you e.g. wrapped the incoming stream with a BufferedReader, you have nowhere to keep the resulting instance in between multiple calls to marshal.load() from external code.

For best performance ISTM you'd have to implement your own buffering - but surely this is to be avoided? It can't be the only place where you need good I/O performance from file-like objects. A quick scan of the pickle module didn't show me anything I could easily use, and a key difference from pickle is that you don't have a corresponding "Unmarshaller" object which could hold the state that an Unpickler does, and which would be needed to hold the buffering state.

Of course one could implement limited buffering, i.e. for just the duration of a single marshal.load() call, but perhaps this could be done as a later step after evaluating the actual performance of this implementation. Having something that works correctly, albeit slowly, is better than having the current situation ...
History
Date User Action Args
2011-06-09 16:36:30vinay.sajipsetrecipients: + vinay.sajip, georg.brandl, amaury.forgeotdarc, benjamin.peterson, Arfrever
2011-06-09 16:36:30vinay.sajipsetmessageid: <1307637390.79.0.756805208673.issue12291@psf.upfronthosting.co.za>
2011-06-09 16:36:30vinay.sajiplinkissue12291 messages
2011-06-09 16:36:29vinay.sajipcreate