Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(979)

Issue 189051: Incrementally flush large cPickle output to file

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 3 months ago by Skip
Modified:
14 years, 3 months ago
CC:
unladen-swallow_googlegroups.com
Base URL:
http://unladen-swallow.googlecode.com/svn/trunk/
Visibility:
Public.

Description

In http://bugs.python.org/issue5683 Antoine Pitrou added a comment requesting that the cPickle buffer be limited in size to avoid chewing up all of memory when pickling very large objects. This patch (ignore the Makefile.pre.in diff - I'm still new at this) implements the incremental flush operation when pickling to a file. There's no obvious (to me) place to put the growing pickle when calling cPickle.dumps.

Patch Set 1 #

Patch Set 2 : revised patch #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -1 line) Patch
M Modules/cPickle.c View 1 4 chunks +21 lines, -1 line 5 comments Download

Messages

Total messages: 9
Skip
PTAL.
14 years, 3 months ago (2010-01-13 10:19:18 UTC) #1
Skip
Here's a revised patch. No spurious Makefile.pre.in diffs either.
14 years, 3 months ago (2010-01-13 11:46:06 UTC) #2
Antoine Pitrou
http://codereview.appspot.com/189051/diff/7/1001 File Modules/cPickle.c (right): http://codereview.appspot.com/189051/diff/7/1001#newcode692 Modules/cPickle.c:692: look at the entire pickled object */ You could ...
14 years, 3 months ago (2010-01-13 13:08:11 UTC) #3
Skip
http://codereview.appspot.com/189051/diff/7/1001 File Modules/cPickle.c (right): http://codereview.appspot.com/189051/diff/7/1001#newcode692 Modules/cPickle.c:692: look at the entire pickled object */ Sure, but ...
14 years, 3 months ago (2010-01-13 13:47:16 UTC) #4
Skip
http://codereview.appspot.com/189051/diff/7/1001 File Modules/cPickle.c (right): http://codereview.appspot.com/189051/diff/7/1001#newcode692 Modules/cPickle.c:692: look at the entire pickled object */ On 2010/01/13 ...
14 years, 3 months ago (2010-01-13 13:48:59 UTC) #5
collinwinter
What is the performance impact of this change? Can you run `perf.py -r -b pickle,pickle_list,pickle_dict` ...
14 years, 3 months ago (2010-01-13 17:29:42 UTC) #6
skip_pobox.com
Collin> What is the performance impact of this change? Can you run Collin> `perf.py -r ...
14 years, 3 months ago (2010-01-13 23:32:35 UTC) #7
Skip
Report on Darwin montanaro.dyndns.org 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; ...
14 years, 3 months ago (2010-01-13 23:34:58 UTC) #8
collinwinter
14 years, 3 months ago (2010-01-24 04:59:51 UTC) #9
LGTM. I agree that the performance degradation is acceptable, assuming all the
test_cpickle and test_xpickle tests pass.

I've added you to our committers list. Can you just check this in yourself?
Thanks for the patch!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b