[issue14043] Speed-up importlib's _FileFinder

Antoine Pitrou report at bugs.python.org
Fri Feb 17 22:41:20 CET 2012


Antoine Pitrou <pitrou at free.fr> added the comment:

> And while I'm thinking about it, the hybrid caching approach of
> caching just the directory contents to start and then caching full
> details on successful searches (and failures) would also let you cache
> the full file path as the strings will be interned and used again by
> the loaders for setting __file__.

Well, you shouldn't call find_module() on the same module twice (except
for benchmarks), so I'm not sure what caching the results would bring.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14043>
_______________________________________


More information about the Python-bugs-list mailing list