[Pythonmac-SIG] Re: MacPython 2.2.2 final candidate

Neil Mayhew niel_mayhew@mac.com
Mon, 04 Nov 2002 12:15:33 -0700


Chris (and anyone else with a DP machine),

Try this:

import sys, os, time

for dir in sys.path:
    start = time.time()
    os.stat(dir)
    print "%.2f %s" % (time.time() - start, dir)

I created a file with these lines in it (test.py), used EditPythonPrefs to
permanently set the options for PythonInterpreter to ignore site-python, and
dropped the test.py file onto PythonInterpreter. The average over five runs
was:

1.59  ...:Applications:Developer:Python 2.2.2:Lib
0.81  ...:Applications:Developer:Python 2.2.2:Mac:Lib
0.61  ...:Applications:Developer:Python 2.2.2:Lib:lib-dynload
0.35  ...:Applications:Developer:Python 2.2.2:
0.08  ...:Applications:Developer:Python 2.2.2:Extensions:img:Mac
0.06  ...:Applications:Developer:Python 2.2.2:Extensions:Imaging
0.06  ...:Applications:Developer:Python 2.2.2:Lib:lib-tk
0.05  ...:Applications:Developer:Python 2.2.2:Mac:Lib:lib-compat
0.04  ...:Desktop:
0.00  ...:Applications:Developer:Python 2.2.2:Mac:Lib:lib-scriptpackages
0.00  ...:Applications:Developer:Python 2.2.2:Extensions:img:Lib
0.00  ...:Applications:Developer:Python 2.2.2:Lib:site-packages
----
3.65

Since os.stat is a builtin, I can't analyze this any further.

I have tried it with 2.2.1, and I get similar results (when it works). I
feel sure this didn't happen with one of the pre-releases that Jack sent
out, but I can't remember which one, and the installers aren't there any
more. The 222b1 installer I do still have has expired and won't run.

I am using a 2x1.25GHz machine with 1Gb of RAM.

--Neil

--
Neil Mayhew
Calgary, Alberta, Canada
niel_mayhew@mac.com

(Email address deliberately misspelled to foil spammers)