On 2015-04-23 05:46, Robert Bradshaw wrote:
> The memory use goes up because it caches the parse of .pxd files (which
> otherwise must be re-parsed over and over, which gets expensive).
> However, this does seem excessive. Do you have any kind of heap dump
> towards the end?
After removing the cache from cached_method, cached_function and
load_cached, the problem persists.
guppy/heapy dump after Cythonizing one module:
Cythonizing sage/algebras/letterplace/free_algebra_element_letterplace.pyx
Partition of a set of 74143 objects. Total size = 16750128 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 4104 6 4494528 27 4494528 27 dict of
Cython.Compiler.Symtab.Entry
1 9613 13 1773840 11 6268368 37
Cython.Compiler.StringEncoding.EncodedString
2 20977 28 1667656 10 7936024 47 list
3 3142 4 1582480 9 9518504 57 dict (no owner)
4 5696 8 1398416 8 10916920 65 unicode
5 1264 2 1324672 8 12241592 73 dict of
Cython.Compiler.PyrexTypes.CFuncType
6 2419 3 677320 4 12918912 77 dict of
Cython.Compiler.PyrexTypes.CFuncTypeArg
7 6881 9 585096 3 13504008 81 tuple
8 1487 2 416360 2 13920368 83 dict of
Cython.Compiler.PyrexTypes.CPtrType
9 3861 5 384352 2 14304720 85 str