[Python-Dev] Unpickling memory usage problem, and a proposed solution (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Fri Apr 23 23:24:10 CEST 2010
- Previous message: [Python-Dev] Unpickling memory usage problem, and a proposed solution
- Next message: [Python-Dev] Unpickling memory usage problem, and a proposed solution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Collin Winter <collinwinter google.com> writes:
I don't think it's possible in general to remove any PUTs if the pickle is being written to a file-like object.
Does cPickle bytecode have some kind of NOP instruction? You could keep track of which PUTs weren't necessary and zero them out at the end. It would be much cheaper than writing a whole other "optimized" stream.
(of course it only works on a seekable stream :-))
Regards
Antoine.
- Previous message: [Python-Dev] Unpickling memory usage problem, and a proposed solution
- Next message: [Python-Dev] Unpickling memory usage problem, and a proposed solution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]