pythonXX.dll size: please split CJK codecs out

Giovanni Bajo noway at sorry.com
Sat Aug 20 15:48:30 EDT 2005


Hello,

python24.dll is much bigger than python23.dll. This was discussed already on
the newsgroup, see the thread starting here:
http://mail.python.org/pipermail/python-list/2004-July/229096.html

I don't think I fully understand the reason why additional .pyd modules were
built into the .dll. OTOH, this does not help anyone, since:

- Normal users don't care about the size of the pythonXX.dll, or the number of
dependencies, nor if a given module is shipped as .py or .pyd. They just import
modules of the standard library, ignoring where each module resides. So,
putting more modules (or less modules) within pythonXX.dll makes absolutely no
differences for them.
- Users which freeze applications instead are *worse* served by this, because
they end up with larger programs. For them, it is better to have the highest
granularity wrt external modules, so that the resulting freezed application is
as small as possible.

A post in the previous thread (specifically
http://mail.python.org/pipermail/python-list/2004-July/229157.html) suggests
that py2exe users might get a small benefit from the fact that in some cases
they would be able to ship the program with only 3 files (app.exe,
python24.dll, and library.zip). But:

1) I reckon this is a *very* rare case. You need to write an application that
does not use Tk, socket, zlib, expat, nor any external library like numarray or
PIL.
2) Even if you fit the above case, you still end up with 3 files, which means
you still have to package your app somehow, etc. Also, the resulting package
will be *bigger* for no reason, as python24.dll might include modules which the
user doesn't need.

I don't think that merging things into python24.dll is a good way to serve
users of freezing programs, not even py2exe users. Personally, I use McMillan's
PyInstaller[1] which always builds a single executable, no matter what. So I do
not like the idea that things are getting worse because of py2exe: py2exe
should be fixed instead, if its users request to have fewer files to ship (in
my case, for instance, this missing feature is a showstopper for adopting
py2exe).

Can we at least undo this unfortunate move in time for 2.5? I would be grateful
if *at least* the CJK codecs (which are like 1Mb big) are splitted out of
python25.dll. IMHO, I would prefer having *more* granularity, rather than
*less*.

+1 on splitting out the CJK codecs.

Thanks,
Giovanni Bajo


[1] See also my page on PyInstaller: http://www.develer.com/oss/PyInstaller





More information about the Python-list mailing list