Python comment stripper
Dennis Reinhardt
DennisR at dair.com
Thu Sep 19 00:22:07 EDT 2002
> Um ... if you are including Python22.dll in the download, surely that is
> dwarfing your code size?
> Therefore your package sizes would go from 368 KB -> 366 KB.
Compressing a single .py file is lost in noise, agreed.
> Even assuming you have 100 times as much (compressed) code, and the
comment
> savings are identical:
> 663 KB -> 499 KB
> Is the savings worth the hassle?
The entire lib directory is 177 files comprising 1.92 Mb. The corresponding
savings are (approximately)
910 -> 610 Kb. One packaging possibility here is that a Python EXE consists
of Python22.DLL and the entire lib directory at a cost of approximately 610
Kb. There is no dependency checking. Wham -- the entire library is
included. Indeed, building this could be done on a web page by dropping
your main Python code into a web edit box (see
www.http://www.autorunning.com/dgram5.cgi for an online EXE builder I
operate) That sounds pretty hassle-free to me. It is also time-consuming
to unpack dynamically (not an obvious tradeoff). At 910 Kb, we are getting
closer to doing a full install in terms of download size.
There are other packaging possibilities. I cannot promise I will go the way
hinted above. Right now, a comment stripper is not perfected and that is a
major holdback. My own thinking is I will not do comment stripping in
first release. There are other follow on ideas I am mulling over if this
app gains a following.
The savings vs. hassle tradeoff has some favorable and some unfavorable
domains. I don't think there is a single yes/no answer.
--
Dennis Reinhardt
DennisR at dair.com
http://www.dair.com
More information about the Python-list
mailing list