Re: PerlApp slow compared to running from source
by Michael Herger other posts by this author
Jun 19 2009 8:33AM messages near this date
Re: PerlApp slow compared to running from source
|
RE: PerlApp slow compared to running from source
Ahm... may I ask again?
Michael
Am 10.06.2009, 15:00 Uhr, schrieb Michael Herger <slim@[...].net> :
> Hi!
>
> Part of our software suite is a PerlApp packaged GUI application (using
> Wx). Due the used library the resulting file is rather large (~9MB).
>
> As we've had some complaints about slow startup, I've done some testing.
> In order to give an early visual feedback to the user, I've added a
> splash
> screen as early in the code as possible (simplified code):
>
> #!/usr/bin/perl
>
> require 5.008_001;
>
> use strict;
> use File::Path;
> use File::Spec::Functions;
>
> use Time::HiRes qw(time);
> my $x = time();
>
> # don't use Wx, if script is run using perl on OSX, it needs to be run
> using wxperl
> my $splash;
> my $useWx = ($^O !~ /darwin/ || $^X =~ /wxPerl/i) && eval {
> require Wx;
>
> Wx::Image::AddHandler(Wx::ICOHandler->new());
> my $bitmap = Wx::Bitmap->new($'SqueezeCenter.ico',
> Wx::wxBITMAP_TYPE_ICO());
> if ($bitmap) {
> $splash = Wx::SplashScreen->new($bitmap);
> }
>
> require Wx::Event;
> require Slim::GUI::ControlPanel;
> }
>
> print time() - $x;
> ...
>
> Running this code from the source will give me the splash screen within a
> fraction of a second. Running the .exe file would take several seconds to
> get it shown. No matter whether I'm using any of the nocompress, clean or
> dyndll options. The simple timing ($x) would result in an approximately
> 50% longer runtime for the $useWx evaluation.
>
> Is this performance hit to be expected? Is there anything I can do to get
> the startup performance closer to the one running from source?
>
> Full code can be found here:
> http://svn.slimdevices.com/slim/7.4/trunk/server/cleanup.pl
> (please note that the splash screen is not checked in, but was only added
> locally to test with)
>
> Executables:
> http://downloads.slimdevices.com/nightly/?ver=7.4
>
> Regards,
>
--
Michael
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Michael Herger
Foo JH
Jan Dubois
Michael Herger
Michael Herger
Jan Dubois
Foo JH
Michael Herger
Jan Dubois
|