Le Wed, 09 Oct 2013 11:01:01 +1300, Greg Ewing <greg.ew...@canterbury.ac.nz> a écrit : > R. David Murray wrote: > > I can give you one data point: a mobile platform that (currently) > > uses Python3, and does not use linecache because of how much memory > > it consumes. > > Wouldn't a sensible approach be to discard the linecache > when you've finished generating a traceback? You're not > likely to be generating tracebacks often enough to be > worth keeping it from one to the next.
The linecache is also used by the warnings module. I think the sensiblest approach would be to limit its size (LRU-style). Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com