[issue24085] large memory overhead when pyc is recompiled

Anthony Sottile report at bugs.python.org
Fri May 1 17:39:09 CEST 2015


Anthony Sottile added the comment:

3.4 seems happier:

asottile at work:/tmp$ rm *.pyc; python3.4 repro.py
ready
<module 'city_hoods' from '/tmp/city_hoods.py'>
77472
VmHWM:	   77472 kB
VmRSS:	   65228 kB
asottile at work:/tmp$ python3.4 repro.py
ready
<module 'city_hoods' from '/tmp/city_hoods.py'>
77472
VmHWM:	   77472 kB
VmRSS:	   65232 kB


The nasty result above is from 2.7:

$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2


3.3 also seems to have the same exaggerated problem:

$ rm *.pyc -f; python3.3 repro.py
ready
<module 'city_hoods' from '/tmp/city_hoods.py'>
1112996
VmHWM:	 1112996 kB
VmRSS:	  133468 kB
asottile at work:/tmp$ python3.3 repro.py
ready
<module 'city_hoods' from '/tmp/city_hoods.py'>
81392
VmHWM:	   81392 kB
VmRSS:	   69304 kB


$ python3.3
Python 3.3.6 (default, Jan 28 2015, 17:27:09) 
[GCC 4.8.2] on linux


So seems the leaky behaviour was fixed at some point, any ideas of what change fixed it and is there a possibility of backporting it to 2.7?

----------

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


More information about the Python-bugs-list mailing list