pythonXX.dll size: please split CJK codecs out
Ron Adam
rrr at ronadam.com
Sun Aug 21 18:51:04 EDT 2005
Martin v. Löwis wrote:
> Ron Adam wrote:
>
>>I would put the starting minimum boundary as:
>>
>> 1. "The minimum required to start the python interpreter with no
>>additional required files."
>>
>>Currently python 2.4 (on windows) does not yet meet that guideline, so
>>it seems some modules still need to be added while other modules, (I
>>haven't checked which), are probably not needed to meet that guideline.
>
>
> I'm not sure, either, but I *think* python24 won't load any .pyd file
> on interactive startup.
>
>
>>This could be extended to:
>>
>> 2. "The minimum required to run an agreed upon set of simple Python
>>programs."
>>
>>I expect there may be a lot of differing opinions on just what those
>>minimum Python programs should be. But that is where the PEP process
>>comes in.
>
>
> As I mentioned earlier, there also should be a negative list: modules
> that depend on external libraries should not be incorporated into
> python24.dll.
This fits under the above, rule #1, of not needing additional files.
Most notably, this rules out zlib.pyd, _bsddb.pyd,
> and _ssl.pyd, all of which people may consider to be useful into these
> simple programs.
I would not consider those as being part of "simple" programs. But
that's only an opinion and we need something more objective than opinion.
Now that I think of it.. Rule 2 above should be...
2. "The minimum (modules) required to run an agreed upon set of
"common simple" programs.
Frequency of use is also an important consideration.
Maybe there's a way to classify a programs complexity based on a set of
attributes.
So... program simplicity could consider:
1. Complete program is a single .py file.
2. Not larger than 'n' lines. (some reasonable limit)
3. Limited number of import statements.
(less than 'n' modules imported)
4. Uses only stdio and/or basic file operations for input
and output. (runs in interactive console or command line.)
Then ranking the frequency of imported modules from this set of programs
could give a good hint as to what might be included and those less
frequently used that may be excluded.
Setting a pythonxx.dll minimum file size goal could further help. For
example if excluding modules result is less than the minimum goal, then
a few extra more frequently used modules could be included as a bonus.
This is obviously a "practical beats purity" exercise. ;-)
Cheers,
Ron
> Regards,
> Martin
More information about the Python-list
mailing list