Matthias Troffaes added the comment:
Thanks for the quick response. I agree with Georg on all points, i.e. longer
function names and no extra options.
--
___
Python tracker
<http://bugs.python.org/issue20
Matthias Troffaes added the comment:
Chiming in here: Sphinx's testing framework does include a feature that allows
easily read/write files into/from text/bytes directly from path-like objects.
There is thus a demand out there. If this feature were to make it into stdlib,
it would be lov
Matthias Troffaes added the comment:
Patch against current tip attached.
I can no longer reproduce the large memory leaks with the current tip (which is
of course wonderful!), so I guess the second part of the patch (freeing the
freelists during gc.collect) makes no longer sense
Matthias Troffaes added the comment:
I uploaded updates of the three relevant patches against the current revision
of the py3k branch, as the old patches no longer applied cleanly due to
whitespace changes.
To summarize:
* The first patch, py3k-rev81387-clearfreelist-dict_set_list.patch
Changes by Matthias Troffaes :
Added file:
http://bugs.python.org/file17429/py3k-rev81387-clearfreelist-time_gc_collect.patch
___
Python tracker
<http://bugs.python.org/issue6
Changes by Matthias Troffaes :
Added file:
http://bugs.python.org/file17428/py3k-rev81387-clearfreelist-gc_collect.patch
___
Python tracker
<http://bugs.python.org/issue6
Changes by Matthias Troffaes :
Added file:
http://bugs.python.org/file17427/py3k-rev81387-clearfreelist-dict_set_list.patch
___
Python tracker
<http://bugs.python.org/issue6
Matthias Troffaes added the comment:
To aid the discussion, I attach another quick patch which reports the
time spent on PyXXX_ClearFreeList calls during highest generation
garbage collection (including gc.collect()). For simplicity, the timer
uses clock() so the resolution is quite limited
Matthias Troffaes added the comment:
Thanks for the feedback!
Attaching a new patch which implements tp_free_list slot as suggested -
I hope I did it correctly. I've only implemented the new slot for dict
so far, but I'm happy to tp_free_list-ify the other freelist types as
well, i
Matthias Troffaes added the comment:
I'm also attaching a test script to check the effect of the two patches
on gc.collect(). If many objects are allocated, space savings appear to
be relevant.
Before applying the patch (debug build on linux 64 bit):
Memory used (begin): 121Mb
me
Matthias Troffaes added the comment:
I attach a second patch which also calls the new PyXXX_ClearFreeList
functions on garbage collection, during gc.collect().
--
Added file: http://bugs.python.org/file14709/py3k-clearfreelist-gc_collect.patch
New submission from Matthias Troffaes :
The Python C API provides PyXXX_ClearFreeList functions to allow the
float, int, etc... freelists to be freed, potentially releasing memory
to the OS earlier. Currently, there is no such API for the dict, set,
and list freelists.
The attached patch adds
12 matches
Mail list logo