New submission from Robert Collins:

Discovered in issue 17911, all the traceback calls that render a stack trace 
end up calling linecache.checkcache, which stats files on disk, making getting 
a traceback rather more expensive than folk may expect. For "oops, it crashed" 
situations thats fine, but when used to gather diagnostic details like tulip 
does, it becomes substantially more wasteful. Since we know when we've reloaded 
a module, there should be no need to go out to disk at any other time - 
particularly since if we *haven't* reloaded the module, doing so will just end 
up showing the wrong source.

Further, PEP 302 source code isn't refreshed when the cache is checked, which 
can lead to stale code in modules that *have* been reloaded.

----------
messages: 234318
nosy: rbcollins
priority: normal
severity: normal
status: open
title: traceback: formatting a traceback stats the filesystem

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23273>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to