[Distutils] slow Python startup with a couple of easy_install-ed packages
theller at ctypes.org
Fri Feb 23 20:44:12 CET 2007
Well, easy_install makes it snap to install packages that I may or may
not use. Nothing is easier than to 'easy_install something-recently-announced',
even if I never will use it (after a preliminary look). Often I forget to
uninstall the packages again, or promise to do that later. Disk space is cheap.
However, I found that with the ~20 eggs that I have installed the startup time
of the Python interpreter (Python2.5, WinXP, measured with 'timeit python -c ""')
rises considerably - 2.5 times slower.
This only occurs when the eggs are listed in the easy_install.pth file; if they
are moved into a 'normal' pth file this slowdown does not occur, although I can
still import the eggs fine.
I assume the additional time is spent by setuptools looking up entry points or
whatever? And that this additional processing is not needed for the eggs that
do not provide entry points? Or are not *using* setuptools themselves?
If this is true, wouldn't it be possible to skip the processing for those
IMO this is a critical problem of easy_install... (Imaging how the installed and
possibly never used eggs pile up).
More information about the Distutils-SIG