#762: progdetails menu is slow to load
-------------------------------+--------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: ijr
Type: patch | Status: new
Priority: minor | Milestone:
Component: mythtv | Version:
Severity: medium |
-------------------------------+--------------------------------------------
The progdetails menu is slow to load. This appears to be a result of
computing the background image of m_richtext four(!) times.
This patch gets rid of two of these. Firstly, UIRichTextType is changed
to decouple loading the background image (loadBackgroundImg) and computing
m_compBackground (updateBackground()). A sizable fraction of the time was
spent in scaling the loaded image, so this decoupling greatly decreases
the cost of SetBackground(). As a result, many of the recomputations of
m_compBackground are avoided as well, since that is not necessary if no
new background image was loaded. Secondly, ProgDetails::setDetails()
calls m_richtext->SetBackground(&mybackground). This was already run in
the constructor and does not appear to need to be re-called.
This patch decreased the load time of progdetails on my system (Athlon XP
3000) from 1.05 seconds to 0.35 seconds.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/762>
MythTV <http://www.mythtv.org/>
MythTV
_______________________________________________
mythtv-commits mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-commits