[issue23916] module importing performance regression

Brett Cannon report at bugs.python.org
Sun Jul 16 17:19:52 EDT 2017


Brett Cannon added the comment:

I agree with Antoine that this shouldn't change. Having said that, it
wouldn't be hard to write your own finder using importlib that doesn't get
the directory contents and instead checks for the file directly (and you
could even set it just for your troublesome directory to get the
performance benefit from the default finder).

On Sun, Jul 16, 2017, 05:25 Antoine Pitrou, <report at bugs.python.org> wrote:

>
> Antoine Pitrou added the comment:
>
> Thanks for the reproducer.  I haven't changed my mind on the resolution,
> as it is an extremely unlikely usecase (a directory with 1e8 files is
> painful to manage with standard command-line tools).  I suggest you change
> your approach, for example you could use a directory hashing scheme to
> spread the files into smaller subdirectories.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue23916>
> _______________________________________
>

----------

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


More information about the Python-bugs-list mailing list