Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4160
| From | "Martin v. Loewis" <martin@v.loewis.de> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: minimal python27.dll? |
| Date | 2011-04-27 22:06 +0200 |
| Organization | 1&1 Internet AG |
| Message-ID | <4DB8774C.9080400@v.loewis.de> (permalink) |
| References | <c283ce47-e886-4164-8a24-4a90bc2e13ba@d19g2000prh.googlegroups.com> |
Am 27.04.2011 12:43, schrieb est: > Hi guys, > > I need to ship python runtime environment package on Windows, if I > want to stripping unnessasery functions from python27.dll to make it > as small as possible(and perhaps finally UPX it), which parts of > python27.dll do you think can be removed? > > From what I think, these parts are not needed when shipping with final > end-user product: > > 1. debugging > 2. parse text .py files, because everything is already in bytecode > > Any ideas? Critics? You really should be looking at object sizes first. In your build of Python, find out what object files are largest, and check whether they can be removed or shrinked. Starting with functions that you know you won't need isn't as productive, as it likely leads only to small reductions. E.g. you'll find that there is actually no debugging support in python27.dll anymore that is worth stripping. OTOH, you'll also find that the CJK codecs use quite some space, if you don't need them, they give a rather impressive reduction. Likewise for the Unicode database, although you may actually need it in some cases. I'd rather go for a static build of Python, and let the linker figure out what's needed. Regards, Martin
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
minimal python27.dll? est <electronixtar@gmail.com> - 2011-04-27 03:43 -0700
Re: minimal python27.dll? Tim Golden <mail@timgolden.me.uk> - 2011-04-27 16:15 +0100
Re: minimal python27.dll? "Martin v. Loewis" <martin@v.loewis.de> - 2011-04-27 22:06 +0200
Re: minimal python27.dll? Ryan Kelly <ryan@rfk.id.au> - 2011-04-28 07:49 +1000
Re: minimal python27.dll? "Martin v. Loewis" <martin@v.loewis.de> - 2011-05-01 14:49 +0200
Re: minimal python27.dll? "Martin v. Loewis" <martin@v.loewis.de> - 2011-05-01 14:49 +0200
Re: minimal python27.dll? est <electronixtar@gmail.com> - 2011-04-27 17:37 -0700
Re: minimal python27.dll? "Martin v. Loewis" <martin@v.loewis.de> - 2011-05-01 14:51 +0200
csiph-web