473,467 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Our Luxurious, Rubinesque, Python 2.4

I finally got 'round to installing Python 2.4. I'm planning on using
Python for downloadable software, where every kilobyte counts and
smaller is definitely better. Imagine my surprise when I looked up
python24.dll and found SWEET JUMPING CHRISTMAS it's ballooned up to
1.8MB!

This isn't a deal-killer outright. But python23.dll is 1.0MB, svelte
by comparison.

Can someone tell me what made it 80% larger? Also, how much would I be
able to trim away if I recompiled it myself? Is a lot of it native
implementations of Python libraries that I might not care about
including, or is it all fundamental VM stuff that couldn't possibly be
removed?

Thanks,
/larry/

Jul 18 '05 #1
3 1101
In my experience, when built with the same compiler (gcc 3.3.3) the size
of the python library file (libpython2.x.a on unix machines) hasn't
changed much between 2.3, 2.4, and current CVS:
-rw-r--r-- 1 jepler jepler 950426 Mar 31 21:37 libpython2.3.a
-rw-rw-r-- 1 jepler jepler 1002158 Mar 31 21:36 libpython2.4.a
-rw-rw-r-- 1 jepler jepler 1001982 Mar 31 21:36 libpython2.5.a

Between Python 2.3 and 2.4, the python.org people switched to a
different version of the Microsoft C compiler. Perhaps this is (part
of) the explanation.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCTMItJd01MZaTXX0RAsF/AJwKOheRJfPvGyQvzo2dbvRUpk1BewCdE97I
ZAF4PJDc7wtBXWctTaLF7Ns=
=6leN
-----END PGP SIGNATURE-----

Jul 18 '05 #2
Larry Hastings wrote:
Can someone tell me what made it 80% larger?
python24.dll includes many of the extension modules that were separate
..pyd files in 2.3, namely _csv, _sre, _symtable, _winreg, datetime,
mmap, and parser, i.e. all extension modules that don't require specific
libraries. Furthermore, a few builtin modules where added to 2.4 that
were not present in 2.3 at all.
Also, how much would I be able to trim away if
I recompiled it myself?
Hard to tell. I think people have been able to get it down to 180k.
Is a lot of it native
implementations of Python libraries that I might not care about
including, or is it all fundamental VM stuff that couldn't possibly be
removed?


No. Most of it is modules, followed by objects. Removing modules is
easy; removing objects is more difficult: while you could make a Python
interpreter easily that does not support complex numbers, it is much
harder to build a Python interpreter that does not support weak
references.

Regards,
Martin
Jul 18 '05 #3
Larry Hastings wrote:
Also, how much would I be
able to trim away if I recompiled it myself? Is a lot of it native
implementations of Python libraries that I might not care about
including, or is it all fundamental VM stuff that couldn't possibly be removed?


In Pythons config.c file You can determine which ext-modules will be
compiled into the core. I estimate that a lean core would have a size
around ~600kb. Trimming down further may become hard because You may
have to decide what to sacrifice: tuples, classes or objects ;)

Regards,
Kay

Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.