Hey Martin,

On Thu, Jan 21, 2010 at 2:25 PM, "Martin v. Löwis" <mar...@v.loewis.de> wrote:
> Reid Kleckner wrote:
>> On Thu, Jan 21, 2010 at 4:34 PM, "Martin v. Löwis" <mar...@v.loewis.de> 
>> wrote:
>>>> How large is the LLVM shared library? One surprising data point is that the
>>>> binary is much larger than some of the memory footprint measurements given 
>>>> in
>>>> the PEP.
>>> Could it be that you need to strip the binary, or otherwise remove
>>> unneeded debug information?
>>
>> Python is always built with debug information (-g), at least it was in
>> 2.6.1 which unladen is based off of, and we've made sure to build LLVM
>> the same way.  We had to muck with the LLVM build system to get it to
>> include debugging information.  On my system, stripping the python
>> binary takes it from 82 MB to 9.7 MB.  So yes, it contains extra debug
>> info, which explains the footprint measurements.  The question is
>> whether we want LLVM built with debug info or not.
>
> Ok, so if 70MB are debug information, I think a lot of the concerns are
> removed:
> - debug information doesn't consume any main memory, as it doesn't get
>  mapped when the process is started.
> - debug information also doesn't take up space in the system
>  distributions, as they distribute stripped binaries.
>
> As 10MB is still 10 times as large as a current Python binary,people
> will probably search for ways to reduce that further, or at least split
> it up into pieces.

70MB of the increase was indeed debug information. Since the Linux
distros that I checked ship stripped Python binaries, I've stripped
the Unladen Swallow binaries as well, and while the size increase is
still significant, it's not as large as it once was.

Stripped CPython 2.6.4: 1.3 MB
Stripped CPython 3.1.1: 1.4 MB
Stripped Unladen r1041: 12 MB

A 9x increase is better than a 20x increase, but it's not great,
either. There is still room to trim the set of LLVM libraries used by
Unladen Swallow, and we're continuing to investigate reducing on-disk
binary size (http://code.google.com/p/unladen-swallow/issues/detail?id=118
tracks this).

I've updated the PEP to reflect this configuration, since it's what
most users will pick up via their system package managers. The exact
change to the PEP wording is
http://codereview.appspot.com/186247/diff2/6001:6003/5002.

Thanks,
Collin Winter
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to