[Python-Dev] No longer enable Py_TRACE_REFS by default in debug build
I recall finding memory leaks using this. (E.g. I remember a leak in Zope
due to a cache that was never pruned.)
But presumably gc.get_objects() would have been sufficient. (IIRC it didn't
exist at the time.)
On Wed, Apr 10, 2019 at 11:48 AM Steve Dower <steve.dower at python.org> wrote:
> On 10Apr2019 1109, Steve Dower wrote:
> > On 10Apr2019 0401, Victor Stinner wrote:
> >>> I think it's worthwhile if we can really get to debug and non-debug
> >>> builds being ABI compatible. Getting partway there in this case doesn't
> >>> seem to offer any benefits.
> >> Disabling Py_TRACE_REFS by default in debug mode reduces the Python
> >> memory footprint. Py_TRACE_REFS costs 2 pointers per PyObject: 16
> >> bytes on 64-bit platforms.
> > Right, except it's debug mode.
> I left this comment unfinished :)
> It's debug mode, and so you should expect less efficient memory and CPU
> usage. That's why we have two modes - so that it's easier to debug issues.
> Now, if debug mode was unusably slow or had way too much overhead, we'd
> want to fix that. But it isn't unusable, so reducing memory usage at the
> cost of making debugging harder is not compelling.
> Python-Dev mailing list
> Python-Dev at python.org
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him/his **(why is my pronoun here?)*
-------------- next part --------------
An HTML attachment was scrubbed...