ActiveBlog

PerlApp'd executable size explosion with AP5.8
by Kevin "kj" Woolley

Kevin "kj" Woolley, March 24, 2006

More than a few people are surprised when they upgrade to PDK 6.0.x and ActivePerl 5.8. In addition to being more solid than ActivePerl 5.6 with PDK 5, the freestanding executables are sometimes three or four times larger. There is...

More than a few people are surprised when they upgrade to PDK 6.0.x and ActivePerl 5.8.  In addition to being more solid than ActivePerl 5.6 with PDK 5, the freestanding executables are sometimes three or four times larger.

There is one word that is responsible for much of this apparent bloat:  Unicode.

When PerlApp puts together an executable in freestanding mode, it has to be sure to include all required modules and their contingent bits and pieces.  Because PerlApp can't tell if a conditionally required module will be needed, it includes it to be on the safe side.  Often, this is how the Unicode modules (which aren't all that big) and the translation tables (which are that big) get involved.

The easiest way to cure this problem is to trim out the Unicode modules and related files using the PerlApp graphical user interface, or --trim arguments on the command line.  Whichever way you choose, you should be aware that some modules generate and use Unicode internally.  If your application begins to fail after removing the Unicode modules and/or translation tables, you will need to play with it a bit to figure out which are needed and which aren't for your given application.

The best way to get the initial settings correct is to use the PerlApp graphical interface.  There you can see which modules and extra files will be included, and have the opportunity to trim them out.  When you have everything set up correctly, the Output tab of the graphical interface will show you the command line you need to use to reproduce the build with those settings.

This should bring the size down substantially.  If it does the trick for you, let me know and I will give some rough numbers that I hear from people as examples in a future version of this entry.

Subscribe to ActiveState Blogs by Email

Share this post:

About the Author: RSS

kj is ActiveState’s Systems Administrator. He was born in London, Ontario, grew up in North Vancouver, and spent several years in the Northwest Territories doing technical sales. As a technical infrastructure specialist, he brings over twenty years of systems administration experience to ActiveState.