[Pythonmac-SIG] Slow loading of modules

Ronald Oussoren oussoren@cistron.nl
Sat, 22 Feb 2003 16:21:08 +0100


On Saturday, Feb 22, 2003, at 01:00 Europe/Amsterdam, Jack Jansen wrote:

> After playing around with DYLD_PRINT_LIBRARIES a bit (setting this  
> environment variable causes the dynamic loader to print out library  
> names as it loads them) I get the impression that I've found the  
> slowdown. It appears that HIToolbox is the main culprit: the first  
> module loading that will stall for approximately 8 seconds on my  
> 400Mhz G3.

I see the same problem here, ktrace says (kdump -T + script to create  
incremental timestamps):

2178 python 0.420467 CALL  
load_shared_file(0x93a20420,0x218000,0xe2614,0xbfffd350,0x4,0xbfffd2e0,0 
xbfffd354)
2178 python 0.420592 NAMI "/usr/lib/libcrypto.0.9.dylib"
2178 python 0.420825 RET load_shared_file 0
2178 python 0.421384 CALL close(0x5)
2178 python 0.42152 RET close 0
2178 python 6.57782 CALL open(0x430b0,0,0)
2178 python 6.57802 NAMI  
"/System/Library/Frameworks/Carbon.framework/Versions/Current/ 
Frameworks/HIToolbox.framework/HIToolbox"
2178 python 6.57818 RET open 5

The process is doing no systems calls for about 6 seconds between  
loading libcrypto and the HIToolbox.

I hope this helps a little,
	
	Ronald