Python startup seems slow... (NT)

Joel Lucsy jjlucsy at concentric.net
Fri Jan 28 10:39:30 EST 2000


> I find it strange that you find this long delay, but others (myself
> included) find the standard DLL loads quickly every time (possibly a bit
> slower the first time). I can think of a few possible reasons for this.
> Perhaps the python DLL loads other DLLs which take time to load, and which
> are preloaded into memory on my system, but not on yours. The python
> dependencies are KERNEL32, USER32, ADVAPI32, WSOCK32, WINMM, MSVCRT, most
> of which would be loaded on any booted windows system. WSOCK32 might be
> unloaded if you do not normally have a network connection, in which case
> running up a network application before running python should reduce the
> wait.

Only if the dlls are loaded at the same base address.

> The other possibility that occurs to me might be a conflicting DLL already
> loaded in the system at the same address. This would mean that the python
> dll would have to be relocated every time it loads, however the delayed
> loading DLL shouldn't be faster in this case unless it has a different
> relocation base.

On my system and another I've talked to with email, it's the winmm that
causes the problem. Most likely it's caused by improperly written sound
drivers. I have a laptop which probably exacerbates the problem.

As I said in another post, delayload is probably not for everyone, or every
project. I'm embedding python in a particular plug-in which works within a
huge memory hog of an application. I definately noticed the delay in loading
the standard python.dll. Now that I've rebuilt python15.dll with delayload
for my project, it loads darn quick. I don't expect to use any functions
within the delayloaded modules, so all the better for me.

-
Joel Lucsy (jjlucsy at concentric.net)








More information about the Python-list mailing list