Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Decrease startup time of perl executable in Windows

by athanasia (Pilgrim)
on Nov 17, 2008 at 16:44 UTC ( #724077=perlquestion: print w/replies, xml ) Need Help??

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- 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 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 "";
and the command that I use for compilation is
pp -v -l C:\Perl\lib -l C:\Perl\site\lib -a C:\Perl\eg\ + --gui -i C:\Perl\eg\images\logo.ico -o myscript.exe
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,

Replies are listed 'Best First'.
Re: Decrease startup time of perl executable in Windows
by hominid (Priest) on Nov 17, 2008 at 16:53 UTC
    I quit using PAR once I discovered Cava. It doesn't compress code like PAR does so the executables it creates start faster.
      If the .EXE that Cava generates is small enough, you may be able to convert it to a .COM file for an extra notch of speed, too.
      Indeed, I tried Cava and it is working perfectly. Not only has the startup time of the exe significantly decreased, but there are nice features that come along, such as console/gui option, use of icons, selection of run time privileges required (asInvoker, requireAdministrator etc.), easy edition of version/company/product name information...

      Thank you very much for suggesting this packager, I had never come across it in the past.

Re: Decrease startup time of perl executable in Windows
by MidLifeXis (Monsignor) on Nov 17, 2008 at 17:05 UTC

    Is there a way to throw up a splash screen or something very early in the process? That might occupy the user until the real work starts.

    Of course, this is coming from someone who has not had to use a perl bundler before.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://724077]
Approved by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (2)
As of 2022-08-13 14:36 GMT
Find Nodes?
    Voting Booth?

    No recent polls found