Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Trimming the fat from PerlAPP

by 2old4this (Initiate)
on Oct 24, 2004 at 15:03 UTC ( #402038=perlquestion: print w/replies, xml ) Need Help??
2old4this has asked for the wisdom of the Perl Monks concerning the following question:

To the Monks(or anyone who would help me),

I have finally gotten my TK script working correctly, begged the Company's purchase of the Perl Dev Kit and all the while making grand claims that a Perl script executing in standalone executable form would be the most cost effective solution in money and manhours.

I spit out a semi busy little script that loads the following:
use Crypt::TripleDES; use integer; use Tk; use Tk::Balloon; use Tk::BrowseEntry; use Tk::NoteBook; use Tk::Pane; use Win32; use Win32::TieRegistry
The bundled "APP" turned out to be 3.5MB!
I knew that there would be overhead but was still a little surprised.

I later managed to cut it down to 1.99MB by removing Encode's CN, JP, KR & TW pm's but I'm wondering if I can trim even more unneeded libs to give the "APP" a more waifish look on the harddrive.

I am looking at more encodes and unicodes, but am holding everything suspect. Any suggestions?


Replies are listed 'Best First'.
Re: Trimming the fat from PerlAPP
by Joost (Canon) on Oct 24, 2004 at 15:42 UTC
Re: Trimming the fat from PerlAPP
by tachyon (Chancellor) on Oct 25, 2004 at 00:04 UTC

    most cost effective solution in money and manhours.....the bundled "APP" turned out to be 3.5MB!

    So you want fast and easy to develop with a miniscule binary I suppose? Sadly this won't happen. The perl binary itself is at least 650K. The basic Tk dll is 450K so there is 1.1 MB (that won't compress) before you even draw breath. You can add at another 300K just for the associated source code of Dynaloader, Crypt, Tk, and Win32 which is now 1.4MB If you get the impression it is unlikely to fit on a floppy you are right but unless you *need* it to fit on a floppy why worry?




      You're right, I am getting a little greedy... I'll do some minor messing around with unicode and put it to bed.

Re: Trimming the fat from PerlAPP
by ldln (Pilgrim) on Oct 25, 2004 at 00:21 UTC
    If you use the --nocompress option with perlapp and instead compress the .exe with more efficient packer, like UPX, you can cut off up to ~500kb on the finished .exe-file - depending on the size of your app.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://402038]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2018-01-19 18:11 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (222 votes). Check out past polls.