[issue17911] traceback: add a new thin class storing a traceback without storing local variables
Robert Collins
report at bugs.python.org
Mon Jan 19 03:12:38 CET 2015
Robert Collins added the comment:
And this improves the scaling of the cache stating overhead, but we may well want to fix this more fundamentally - e.g. by linking the cache ownership into the import system somehow, so that when a file is reimported, the cached source is automatically evicted, and format_stack etc have no need to stat at all.
I tested this with the following script in timeit:
import traceback
def recurse(count):
if count> 0:
return recurse(count - 1)
return traceback.format_stack()
def doit():
len(recurse(500))
----------
Added file: http://bugs.python.org/file37771/tb_stats_1.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17911>
_______________________________________
More information about the Python-bugs-list
mailing list