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.

classification
Title: Fix quadratic behavior for marshal.dumps() when len>32Mb
Type: resource usage Stage:
Components: Versions: Python 2.6
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: loewis, rhettinger
Priority: high Keywords: patch

Created on 2008-06-15 10:29 by rhettinger, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
marshal.diff rhettinger, 2008-06-15 10:29 Diff for Python/marshal.c
Messages (3)
msg68230 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-06-15 10:29
Martin, can you give this a second review?

See original discussion at:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/ac8
f121c5d043198#

Patch replaces constant size over-allocation with the amortized linear 
growth strategy used for list.append(), matching its 12.5% over-
allocation rate.
msg68241 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-06-15 16:37
The patch looks fine to me.

Notice that the code you are patching was never released, instead, it's
the result of r63059, which was the resolution of issue1792. So please
leave a message there also that you changed it again (and I do agree
that the capping implemented in r63059 was misguided).

Also, please consider backporting the resulting code to 2.5.
msg68254 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-06-16 01:43
Applied in r64303.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47366
2008-06-16 01:43:34rhettingersetstatus: open -> closed
keywords: patch, patch
messages: + msg68254
2008-06-15 16:37:17loewissetkeywords: patch, patch
assignee: loewis -> rhettinger
resolution: accepted
messages: + msg68241
2008-06-15 10:29:12rhettingercreate