A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/attachments/20110324/a801a40b/attachment.html below:

<div><br></div>My main concern was that a freshly compiled Python attempts to open 168 non-existent files before starting. <div><br></div><div>I understand that an interpreted language is probably not the best choice for an embedded device (although it&#39;s very nice for prototyping) , Python really should know what exists after it&#39;s just been compiled....ie before any corrupting modules or other nonsense has been added.</div>
<div><br></div><div>It appears it is hard coded to open these files regardless of any &quot;configure&quot; options.</div><div><br></div><div>On my desktop pc, when I run the most simple &quot;Hello World&quot; .... 78% of the overall execution time is spent opening files....most of which don&#39;t exist. </div>
<div><br></div><div>Some form of &quot;cache&quot; would help the startup time on the &quot;second go&quot; ..... but arguably just a &quot;band aid&quot; covering a deeper problem.</div><div><br></div><div><br></div><div>
Bruce</div><div><br></div><div><br></div><div><br></div><div> <br><br><div class="gmail_quote">On Thu, Mar 24, 2011 at 3:23 PM, Thomas Heller <span dir="ltr">&lt;<a href="mailto:theller@ctypes.org">theller@ctypes.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Am 24.03.2011 12:18, schrieb &quot;Martin v. Löwis&quot;:<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1. Is there anything I can do at compile time to tell Python these files<br>
don&#39;t exist and avoid trying to open them?<br>
</blockquote>
<br>
If you disable dynamic loading of extension modules, the number of stat<br>
calls will go down significantly.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. Is it possible to make python first try and open the &quot;.pyc&quot; and only<br>
then look for &quot;.py&quot; ?<br>
</blockquote>
<br>
If you then further reduce sys.path, and zip up the standard library<br>
.pyc files, you get further reductions.<br>
</blockquote>
<br></div></div>
On my embedded ARM system (400MHz ARM926EJ-S, linux 2.6.38) Python<br>
starts up even slower when the standard library is in a zip-file.<br>
The effect is worse when the zip-file is compressed, but the slow-down<br>
is still there if the zip-file is not compressed.<br><font color="#888888">
<br>
Thomas<br>
</font></blockquote></div><br></div>

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4