[Python-Dev] Re: Proposal for a modified import mechanism.
James C. Ahlstrom
jim at interet.com
Mon Nov 12 16:02:59 CET 2001
> (and see) 0% overhead for importing standard modules (by far the most
> common case). Adding 10% overhead to importing a very large package
> with 10-15 nested sub-packages is just not a big deal. The 350% cost I
> saw (noted in a response to Gordon) is a *huge* deal and would need to be
> solved (moving to C would help) before this became standard.
I have code which caches directory contents, and related benchmarks.
This might help, and could be combined with a new Python module
for importing packages, say, as a new method "importer" in __init__.py.
Please see python-dev, "Caching directory files in import.c".
More information about the Python-list