[Python-Dev] Anyone building Python --without-doc-strings?

Kristján Valur Jónsson kristjan at ccpgames.com
Thu Jan 31 23:18:06 CET 2013


We do that, of course, but compiling python without the doc strings removes those from all built-in modules as well.
That's quite a lot of static data.
K

-----Original Message-----
From: Victor Stinner [mailto:victor.stinner at gmail.com] 
Sent: 27. janúar 2013 21:58
To: Kristján Valur Jónsson
Cc: R. David Murray; python-dev at python.org
Subject: Re: [Python-Dev] Anyone building Python --without-doc-strings?

Why don't you compile using python -OO and distribute only .pyo code?

Victor

2013/1/27 Kristján Valur Jónsson <kristjan at ccpgames.com>:
> We (CCP) are certainly compiling python without docstrings for our 
> embedded platforms (that include the PS3) Anyone using python as en engine to be used by programs and not users will appreciate the deletion of unneeded memory.
> K
>
> -----Original Message-----
> From: Python-Dev 
> [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf 
> Of R. David Murray
> Sent: 27. janúar 2013 00:38
> To: python-dev at python.org
> Subject: Re: [Python-Dev] Anyone building Python --without-doc-strings?
>
> On Sat, 26 Jan 2013 17:19:32 +0100, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> On Sat, 26 Jan 2013 17:03:59 +0100
>> Stefan Krah <stefan at bytereef.org> wrote:
>> > Stefan Krah <stefan at bytereef.org> wrote:
>> > > I'm not sure how accurate the output is for measuring these 
>> > > things, but according to ``ls'' and ``du'' the option is indeed quite worthless:
>> > >
>> > > ./configure CFLAGS="-Os -s" LDFLAGS="-s" && make
>> > >   1.8M Jan 26 16:36 python
>> > > ./configure --without-doc-strings CFLAGS="-Os -s" LDFLAGS="-s" && make
>> > >   1.6M Jan 26 16:33 python
>> >
>> > The original contribution *was* in fact aiming for "10% smaller", see:
>> >
>> > http://docs.python.org/release/2.3/whatsnew/node20.html
>> >
>> > So apparently people thought it was useful.
>>
>> After a bit of digging, I found the following discussions:
>> http://mail.python.org/pipermail/python-dev/2001-November/018444.html
>> http://mail.python.org/pipermail/python-dev/2002-January/019392.html
>> http://bugs.python.org/issue505375
>>
>> Another reason for accepting the patch seemed to be that it 
>> introduced the Py_DOCSTR() macros, which were viewed as helpful for 
>> other reasons (some people talked about localizing docstrings).
>>
>> I would point out that if 200 KB is really a big win for someone, 
>> then Python (and especially Python 3) is probably not the best 
>> language for them.
>>
>> It is also ironic how the executable size went up since then (from 
>> 0.6 to more than 1.5 MB) :-)
>
> 200K can make a difference.  It does on the QNX platform, for example, 
> where there is no virtual memory.  It would be nice to reduce that 
> executable size, too....but I'm not volunteering to try (at least not
> yet) :)
>
> --David
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/kristjan%40ccpgames.
> com
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/victor.stinner%40gma
> il.com



More information about the Python-Dev mailing list