[Python-Dev] urllib2 EP + decr. startup time
KoDer
koder.mail at gmail.com
Sat Feb 17 12:25:03 CET 2007
> Right -- most of your problem will be solved by creating
> 'C:\\WINDOWS\\system32\\python25.zip', containing the contents of
> C:\\Python25\\lib\\.
C:\\Python25\\lib\\. contain *many* packages with .dll files - i can't
just zip it.
wxPython,pyOpenGL,PIL,tk and so on. On Fedora 6 more than 40% dirs of
/usr/lib/site-packages contained .so files. Some of them add dirs to path
(wx,PIL,Gtk,...).
yum,apt and other will bee very angry if i zip site-packages directory.
I don't known any package manager which can properly work with
packages installed in archive.
Are setuptools can work properly with packages packed in one big zip archive
(i really don't known)?
And finally - if it's so easy why this don't done already? Python widely used
in many linux distros and i don't known any one which can install even
standard library
in zip archive. Most of users can't done it(because they don't known
about python at all).
Or this just because lack of time?
Yesterday i test some programs with strace and receive follow results:
command num of sys_calls num of FILE_NOT_FOUND
python -c "pass" 2807 619 ~20%
yum 20263 11282 >50%
pychecker 6181 2527 ~40%
meld(nice GUI merge util) 16075 8024 50%
ipython < exit.txt 16448 8957 >50%
(exit txt contain "exit()\n")
(if filter some of FILE_NOT_FOUND
which are not produced by python modules search)
BTW. In trace results many call chain like this:
open("/usr/lib/python2.4/site-packages/Durus-3.6-py2.4-linux-i686.egg",
O_RDONLY|O_LARGEFILE) = 6
......
_llseek(6, 98304, [98304], SEEK_SET) = 0
read(6, "\340\377\224\322\373C\200\177.\245\367\205\0\307x\207\r"...,
4096) = 4096
_llseek(6, 102400, [102400], SEEK_SET) = 0
_llseek(6, 102400, [102400], SEEK_SET) = 0
_llseek(6, 102400, [102400], SEEK_SET) = 0
.....
and so on. As i understand all
_llseek(6, 102400, [102400], SEEK_SET) = 0
calls after first are just heating air.
--
K.Danilov aka KoDer
More information about the Python-Dev
mailing list