<br><br><div class="gmail_quote">On Mon, Feb 6, 2012 at 14:49, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, 6 Feb 2012 09:57:56 -0500<br>
Brett Cannon <<a href="mailto:brett@python.org">brett@python.org</a>> wrote:<br>
> Thanks for any help people can provide me on this now 5 year quest to get<br>
> this work finished.<br>
<br>
Do you have any plan to solve the performance issue?<br></blockquote><div><br></div><div>I have not even looked at performance or attempted to profile the code, so I suspect there is room for improvement.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
$ ./python -m timeit -s "import sys; mod='struct'" \<br>
"__import__(mod); del sys.modules[mod]"<br>
10000 loops, best of 3: 75.3 usec per loop<br>
$ ./python -m timeit -s "import sys; mod='struct'; from importlib import __import__" \<br>
"__import__(mod); del sys.modules[mod]"<br>
1000 loops, best of 3: 421 usec per loop<br>
<br>
Startup time is already much worse in 3.3 than in 2.7. With such a<br>
slowdown in importing fresh modules, applications using many batteries<br>
(third-party or not) will be heavily impacted.<br></blockquote><div><br></div><div>I have a benchmark suite for importing modules directly at importlib.test.benchmark, but it doesn't explicitly cover searching far down sys.path. I will see if any of the existing tests implicitly do that and if not add it. </div>
</div>