On Tue, Jan 08, 2002 at 02:26:04PM -0500, Bob Kline wrote: > On Tue, 8 Jan 2002, Trent Mick wrote: > > > > 2. What other tools or procedures can I use to delve further into > > > this problem to track down its cause myself? > > > > You could look at the Python profiler and compare the profile for a > > run on the two machines. > > Well, the profiler shows big differences for the runs on the two > machines, of course, but all the big-ticket items are entries which > point to a row in a python module which says 'import ....' > Unfortunately, the profiler is just profiling python code, not the > Python engine underneath. So I've downloaded the source code from > python.org and I'm doing my own manual instrumentation. So far it looks > as if the bottleneck is not in the actual loading but in locating the > modules.
What modules are being loaded. You can look at the __file__ attribute on the loaded modules to see which actual files those imports correspond to. You are going to want to instrument PC/import_nt.c in the Python source code. Good luck. > > No. Here are the elements in sys.path (including an empty string at the > front): > > c:\winnt\system32 > d:\cdr\lib\python > d:\python\pythonwin > d:\python\win32 > d:\python\win32\lib > d:\python > d:\python\dlls > d:\python\lib > d:\python\lib\plat-win > d:\python\lib\lib-tk > d:\python\ppm > > There is one odd discrepancy between the (newer) problem machine and the > development machine for sys.path: on the development machine the second > element (c:\winnt\system32) is not present. Removing it does not > eliminate the slow module loading, though. Off topic because you said that that does not affec the loading time but: I don't know what c:\winnt\system32 should be there. It is not in my Python installation so it is not a std Python (or ActivePython) thing. Look in HLKM/Software/Python/PythonCore/X.X/PythonPath/. Do any of the entries under that registry keys include "c:\winnt\system32"? Trent -- Trent Mick [EMAIL PROTECTED] _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/activepython