http://qs321.pair.com?node_id=724077

athanasia has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I have used PAR::Packer's pp command in order to create a standalone perl executable for my application. (My OS is Windows Vista Home Premium, ActivePerl-5.8.8.822-MSWin32-x86-280952 and PAR::Packer 0.982).
The problem I am facing is the annoyingly long startup time when I double click on my exe. Depending on the PC's processing power, the time (of the first execution) ranges from 20 seconds to more than 40 seconds, giving the impression that the application is doing nothing!

The only related info I could find in the web was this discussion http://osdir.com/ml/lang.perl.par/2007-11/msg00019.html but it is somewhat complicated for me to follow.

The modules I am including in my script are quite a few
use threads; use threads::shared; use Time::HiRes; use Tk; use Cwd; use Tk::Icon; use Tk::TopLevel; use utf8; use Win32; use Win32::TieRegistry; use Win32::OLE('in'); use Win32::OLE qw(EVENTS); use Win32::FileOp qw(ShellExecute); use Net::UPnP::ControlPoint; use Net::Telnet; use LWP::Simple; use POSIX(":sys_wait_h"); use constant wbemFlagReturnImmediately => 0x10; use constant wbemFlagForwardOnly => 0x20; require "myhelpscript.pl";
and the command that I use for compilation is
pp -v -l C:\Perl\lib -l C:\Perl\site\lib -a C:\Perl\eg\myhelpscript.pl + --gui -i C:\Perl\eg\images\logo.ico -o myscript.exe myscript.pl
Can a more experienced monk point out some methods to decrease the unpack time or suggest any other solution around this problem?

Thanks in advance,
Athanasia