A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-February/013045.html below:

[Python-Dev] Strange import behaviour, recently introduced

[Python-Dev] Strange import behaviour, recently introduced [Python-Dev] Strange import behaviour, recently introducedThomas Heller thomas.heller@ion-tof.com
Wed, 21 Feb 2001 17:39:09 +0100
Jack Jansen wrote:
> I'm running into strange problems with import in frozen Mac programs.
> 
> On the Mac a program is frozen in a rather different way from how it happens 
> on Unix/Windows: basically all .pyc files are stuffed into resources, and if 
> the import code comes across a file on sys.path it will look for PYC resources 
> in that file. So, you freeze a program by stuffing all your modules into the 
> interpreter executable as PYC resources and setting sys.path to contain only 
> the executable file, basically.
> 
> This week I noticed that these resource imports have suddenly become very very 
> slow. Whereas startup time of my application used to be around 2 seconds 
> (where the non-frozen version took 6 seconds) it now takes almost 20 times as 
> long. The non-frozen version still takes 6 seconds.
> 
The most recent version calls PyImport_ImportModuleEx() for '__builtin__'
for every import of __builtin__ without caching the result in a static variable.

Can this be the cause?

Thomas Heller




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