develooper Front page | perl.perl5.porters | Postings from September 2012

[perl #114834] comctl32.dll / 4ebea3c6 causes a 44% slowdown on one liners on Win32

From:
Steve Hay via RT
Date:
September 20, 2012 00:36
Subject:
[perl #114834] comctl32.dll / 4ebea3c6 causes a 44% slowdown on one liners on Win32
Message ID:
rt-3.6.HEAD-11172-1348126598-1933.114834-15-0@perl.org
On Tue Sep 11 01:46:16 2012, jdb wrote:
> Adding the manifest but not loading comctl32.dll at runtime will
> break Win32::MsgBox() on Windows XP after a certain hotfix level.
> I can't remember if the message box would just not show, or if
> the program would hang or crash.  I had tracked it down to a
> particular Window update hotfix, but can't find the notes anymore.
> It should be trivial to reproduce though, if you are curious.
> 
> There have been multiple bug reports about this, which is why I
> added the InitCommonControls() call in the first place.  So I would
> suggest that the manifest part should be removed as well *if* the
> InitCommonControls() call is removed, turning Perl GUI programs
> back to legacy theming by default.
> 
> > without comctl32:
> > __________________________________________________
> > timethis 3000: 29 wallclock secs ( 0.56 usr +  1.17 sys =  1.73 CPU)
> @ 1731.10/s
> >
> > with comctl32:
> > __________________________________________________
> >
> > timethis 3000: 42 wallclock secs ( 0.63 usr +  1.39 sys =  2.02 CPU)
> @ 1488.10/
> > __________________________________________________
> >
> > So my proposal is to remove InitCommonControls() from
> Perl_win32_init
> > in win32.c, which will remove Perl's dependency on comctl32.dll and
> > shlwapi.dll and therefore speeding up startup time. So what are
> > everyones comments on the issue? If I write a patch, will anyone
> > commit it?
> 
> Given that the Perl startup slowdown according to your benchmark above
> is less than 0.005s wallclock time (13s over 3000 oneliner
> invocations),
> I find this negligible and would rather have proper GUI theming turned
> on by default. So I think any patch should be optional (controlled by
> win32/Makefile), and disabled by default.
> 

Given how negligible the speed-up would be, I don't really see any
benefit in even having a Makefile option for this, and am therefore
closing this ticket.

(However, I won't object if someone else wanted to write up a patch to
add such an option, so feel free to re-open the ticket with a suitable
patch if you feel it is worth it.)

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=114834



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About