[New-bugs-announce] [issue24085] large memory overhead when pyc is recompiled

Buck Evan report at bugs.python.org
Thu Apr 30 20:59:04 CEST 2015


New submission from Buck Evan:

In the attached example I show that there's a significant memory overhead present whenever a pre-compiled pyc is not present.

This only occurs with more than 5225 objects (dictionaries in this case)
allocated. At 13756 objects, the mysterious pyc overhead is 50% of memory
usage.

I've reproduced this issue in python 2.6, 2.7, 3.4. I imagine it's present in all cpythons.


$ python -c 'import repro'
16736
$ python -c 'import repro'
8964
$ python -c 'import repro'
8964

$ rm *.pyc; python -c 'import repro'
16740
$ rm *.pyc; python -c 'import repro'
16736
$ rm *.pyc; python -c 'import repro'
16740

----------
files: repro.py
messages: 242281
nosy: bukzor
priority: normal
severity: normal
status: open
title: large memory overhead when pyc is recompiled
versions: Python 3.4
Added file: http://bugs.python.org/file39238/repro.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24085>
_______________________________________


More information about the New-bugs-announce mailing list