On 2 April 2015 at 04:32, Andrew Barnert
On Apr 1, 2015, at 08:18, Eric Snow
wrote: On Wed, Apr 1, 2015 at 8:37 AM, Andrew Barnert
wrote: Anyway, why do you want this? Is there some cache that's using too much memory in an app of yours? Or is it more about getting a semi-clean start on the interactive interpreter? Or something different?
Presumably http://bugs.python.org/issue23839.
Ah, for running a large test suite (like the stdlib's). That makes sense.
From the initial report ("in particular linecache") it seems at least possible that there's really just one cache that's a real issue, in which case there's a pretty obvious fix. (And making it possible to use linecache in a bounded way, instead of all-or-nothing clearing, might be useful for other purposes besides this...) But I don't know if that really is the case; did anyone check whether the 500MB were 90%+ in linecache or anything like that?
We can probably tune the new traceback code to avoid linecache getting
populated at all on a passing testrun.
That would be better than wiping it out on every test, which if its
being hit will just trade memory for CPU - slower test runs.
-Rob
--
Robert Collins