This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author daveroundy
Recipients brett.cannon, daveroundy, eric.snow, ncoghlan, pitrou
Date 2015-04-11.20:50:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CABVG1pDB+agmvFwrtRSHk_PuBBjRhj3wCAHZnGQnLf0aGR67YQ@mail.gmail.com>
In-reply-to <1428784623.37.0.0933890227717.issue23916@psf.upfronthosting.co.za>
Content
I had suspected that might be the case. At this point mostly it's just a
test case where I generated a lot of files to demonstrate the issue.  In my
test case hello world with one module import takes a minute and 40 seconds.
I could make it take longer, of course, by creating more files.

I do think scaling should be a consideration when introducing
optimizations, when if getdents is usually pretty fast.  If the script
directory is normally the last one in the search path couldn't you skip the
listing of that directory without losing your optimization?

On Sat, Apr 11, 2015, 1:37 PM Antoine Pitrou <report@bugs.python.org> wrote:

>
> Antoine Pitrou added the comment:
>
> This change is actually an optimization. The directory is only read once
> and its contents are then cached, which allows for much quicker imports
> when multiple modules are in the directory (common case of a Python
> package).
>
> Can you tell us more about your setup?
> - how many files are in the directory
> - what filesystem is used
> - whether the filesystem is local or remote (e.g. network-attached)
> - your OS and OS version
>
> Also, how long is "very slowly"?
>
> ----------
> nosy: +pitrou
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue23916>
> _______________________________________
>
History
Date User Action Args
2015-04-11 20:50:13daveroundysetrecipients: + daveroundy, brett.cannon, ncoghlan, pitrou, eric.snow
2015-04-11 20:50:13daveroundylinkissue23916 messages
2015-04-11 20:50:13daveroundycreate