#11172: GetOptionInt(wxT("no-maskblt")) performance issues

1 view
Skip to first unread message

wxTrac

unread,
Sep 4, 2009, 5:08:54 PM9/4/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11172>

#11172: GetOptionInt(wxT("no-maskblt")) performance issues
--------------------------+-------------------------------------------------
Reporter: terryfarnham | Owner:
Type: optimization | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version: 2.8.x
Keywords: | Blockedby:
Patch: 0 | Blocking:
--------------------------+-------------------------------------------------
After performing a VTune on my app, I found that strlen() was the biggest
single clock user. It turns out that all of the calls were being made
from the constructor of wxString for wxT("no-maskblt") from within
wxDC::DoDrawBitmap(). It seems like this option could be cached in some
way, or at least the string be pre-built.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11172>

wxTrac

unread,
Sep 5, 2009, 7:21:33 PM9/5/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11172#comment:1>

#11172: GetOptionInt(wxT("no-maskblt")) performance issues

---------------------------+------------------------------------------------
Reporter: terryfarnham | Owner:
Type: optimization | Status: confirmed
Priority: high | Milestone: 2.9.1
Component: wxMSW | Version: 2.8.x
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
---------------------------+------------------------------------------------
Changes (by vadz):

* priority: normal => high
* status: new => confirmed
* milestone: => 2.9.1


Comment:

This is clearly unacceptable. Ideally wxSystemOptions would have some kind
of a smart cache (with a possibility to refresh it) itself but for now I
think just making this a static variable (i.e. not refreshable after the
program start) would be better than alternative.

Julian, any objections?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11172#comment:1>

wxTrac

unread,
Sep 18, 2009, 1:11:24 PM9/18/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11172#comment:2>

#11172: GetOptionInt(wxT("no-maskblt")) performance issues

---------------------------+------------------------------------------------
Reporter: terryfarnham | Owner:
Type: optimization | Status: closed


Priority: high | Milestone: 2.9.1
Component: wxMSW | Version: 2.8.x

Resolution: fixed | Keywords:
Blockedby: | Patch: 0
Blocking: |
---------------------------+------------------------------------------------
Changes (by VZ):

* status: confirmed => closed
* resolution: => fixed


Comment:

(In [61967]) Don't query system option in every DrawBitmap() call under
MSW.

Doing this had noticeable (and bad) performance implications so cache the
value of the option during the first call. This doesn't allow changing its
value during the program execution so we may want to provide some way to
update its value later if really needed.

Closes #11172.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11172#comment:2>

Reply all
Reply to author
Forward
0 new messages