[Zope-Coders] Compiler package leaks fixed: Zope 2.6?
Shane Hathaway
shane@zope.com
Fri, 30 Aug 2002 09:58:57 -0400
Toby Dickenson wrote:
> On Thursday 29 Aug 2002 8:28 pm, Shane Hathaway wrote:
>
>>Hi gang,
>>
>>I spent some time 3 weeks ago clearing up all the cyclic references in
>>the compiler package and RestrictedPython. Now I'm wondering whether
>>these changes should go in Zope 2.6. The changes reduce Zope's memory
>>consumption and reduce the need to use Python's cyclic garbage
>>collector. The only thing I'm concerned about is that the change is not
>>on the Zope 2.6 plan, and I'm the only one who has tested the changes.
>>
>>The branch is shane-leaks-repair-branch. Should I merge it to the trunk?
>
> Are these new cyclic references, or have they been around for a while?
>
> If 2.5.x has had the same problem with anyone really noticing, then I suggest
> holding the fix until 2.7.
2.4.x and 2.5.x had the same problem, and people *did* notice,
especially if Python happened to be running without cyclic garbage
collection. Every time Zope compiles an expression, it creates dozens
(sometimes thousands) of short-lived objects involved in circular
references. And there are a lot of expressions.
I think the risk is that if there are mistakes in the fix, attempting to
compile certain expressions will raise an exception. But exceptions
like that are easy to correct. The likelihood that the revised code
will compile an expression differently from before or segfault is low.
Shane