Stephen Pick wrote:
Hi,
I'm using PAR 0.85, and I'm wondering what on earth PAR is doing on
> the first-time execution of a stand-alone executable built with it. > I use the following command to build my exe:
pp -vv -M utf8 --gui -o app.exe app.pl
The packing process is reasonably quick, but on the first execution.
> I have to wait up to twenty seconds for my application to actually start. > I know that PAR is extracting the modules required to run the > script to a temporary directory on the first run, > but it surely should not take this long. > WinRAR can extract a .par archive built from the > same script (including base modules) in under a second.
PAR seems to extract the relevant files in reasonable time
> (I can see them in the temporary directory as the program is starting), but then > spends ages waiting around without much disk access.
My application is a GUI app using wxPerl which is used to configure
>network computers. It will normally only ever be run once by a user, and a > 20-second startup time seems ridiculous for this kind of task. The only > thing I can think of is that PAR is using a pure-perl > implementation of Archive::Zip to do the extraction, > which would explain the slowness.
If this is true, is there any way to change PARs compression level?
> If the slowness is down to unpacking, would it not be possible to use a faster > (perhaps implemented in C/C++) unpacker or optimize it? PAR is great, > but these loadtimes are making it quite unfeasible for me.
Best regards, Steve Pick
See a recent relevant thread from a couple weeks ago. I have a fairly large pTk app that has the same issue, tho its (hopefully) going to be run more often than just once. While I can't solve your immediate issue, I managed to suppress the lengthy startup time by burying the first time execution inside an Inno Setup script, by adding an exe option that just starts and exits the app, thereby forcing pp/PAR to unpack at install time. After that, startup isn't too bad.
Another thing to look at is the actual modules pp pulls into your .exe. I found a number that were not needed, so you might be able to add a bunch of -X to reduce the number of modules it has to unpack/manage.
Good luck, Dean Arnold Presicient Corp.
