Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] importlib quest

Brett Cannonbrett at python.org
Tue Feb 7 19:26:17 CET 2012


On Mon, Feb 6, 2012 at 14:49, Antoine Pitrou <solipsis at pitrou.net> wrote:> On Mon, 6 Feb 2012 09:57:56 -0500> Brett Cannon <brett at python.org> wrote:> > Thanks for any help people can provide me on this now 5 year quest to get> > this work finished.>> Do you have any plan to solve the performance issue?>I have not even looked at performance or attempted to profile the code, soI suspect there is room for improvement.>> $ ./python -m timeit -s "import sys; mod='struct'" \>  "__import__(mod); del sys.modules[mod]"> 10000 loops, best of 3: 75.3 usec per loop> $ ./python -m timeit -s "import sys; mod='struct'; from importlib import> __import__" \>  "__import__(mod); del sys.modules[mod]"> 1000 loops, best of 3: 421 usec per loop>> Startup time is already much worse in 3.3 than in 2.7. With such a> slowdown in importing fresh modules, applications using many batteries> (third-party or not) will be heavily impacted.>I have a benchmark suite for importing modules directly atimportlib.test.benchmark, but it doesn't explicitly cover searching fardown sys.path. I will see if any of the existing tests implicitly do thatand if not add it.-------------- next part --------------An HTML attachment was scrubbed...URL: <http://mail.python.org/pipermail/python-dev/attachments/20120207/305a1b49/attachment.html>


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp