ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
RE: PerlApp slow compared to running from source
by Jan Dubois other posts by this author
Jun 23 2009 2:56PM messages near this date
Re: PerlApp slow compared to running from source | PerlApp cross-platform target support not working with ActivePerl 826/1005
On Tue, 23 Jun 2009, Michael Herger wrote:
>  > So I wonder if the delay is specific to using wxPerl, or just the
>  > general size of the application.
>  
>  Can't say neither. But it's a delay I've never seen with our other
>  applications (one of which is at least as big as the app using Wx).

I have some suspicion about PerlApp copying too many additional libraries
to disk being responsible for part of the problem.  It looks like there
is no simple way to fix this with the existing PerlApp; I'll try to get
something into 8.0.2 for this.
 
>  > It is also not clear to me if you are using Wx::Perl::Packager or
>  > some other mechanism to bundle the additional libraries.
>  
>  Yes we are using Wx::Perl::Packager.

I think Wx::Perl::Packager is adding to the overhead by copying the
libraries around some more.

I have a hard time figuring out which parts of Wx::Perl::Packager are
really necessary, and which parts are just scaffolding.  I came up
with the following "evil trick" to wrap Wx binaries without using
Wx::Perl::Packager:

    my $wx_dll;
    use Win32;
    BEGIN { $wx_dll = Win32::LoadLibrary("Wx.dll") }
    END   { Win32::FreeLibrary($wx_dll) for 1..2 }

Would you mind trying that out yourself too?  Remove any references to
Wx::Perl::Packager from your source and insert the 4 lines above *after*
the line that says:

    use Wx;

Then build your application(s) normally and run them.  Are they loading
faster now?  Do you get any of the old problems, like errors from not
being able to rmtree() the temp directory or anything else?

Note that I still expect this to be somewhat slower than running the
program via perl.exe because of the additional libraries that are copied
to disk.  I mainly want to hear if this is all that it takes to properly
unload a Wx.pm using program from memory without crashing or leaving
files behind.

Cheers,
-Jan


_______________________________________________
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved