[mythtv-commits] Ticket #10161: Speed up loading of Watch Recordings screen
MythTV
noreply at mythtv.org
Sat Nov 12 00:20:17 UTC 2011
#10161: Speed up loading of Watch Recordings screen
------------------------------------------------+--------------------------
Reporter: Jim Stichnoth <stichnot@…> | Type: Patch -
Status: new | Feature
Milestone: unknown | Priority: minor
Version: Trunk Head | Component: MythTV -
Keywords: | General
| Severity: medium
| Ticket locked: 0
------------------------------------------------+--------------------------
The attached patch improves the initial loading time of the Watch
Recordings screen (PlaybackBox), in cases where there are a large number
of recordings to display and the frontend has a relatively weak CPU such
as an Atom.
This is accomplished through lazy creation of many of the program
attribute strings in ProgramInfo::ToMap(), particularly ones that involve
expensive computation like string rendering of dates. ToMap() creates 68
such attribute strings for each program, the majority of which are
unlikely to be used by a given theme.
On my system (an ION frontend, about 2000 recordings, and using the Blue
Abstract theme), lazy computation saves about 1 millisecond per program,
reducing the total wall-clock load time from about 6 seconds down to about
4 seconds. The patch includes some logging (which should ultimately be
removed) to help with performance comparisons.
If developers feel this is a reasonable direction, then I would also
advocate converting all other uses of InfoMap to use the lazy data
structure, which would remove the code duplication in the
SetTextFromLazyMap() methods. Also, it would be useful to consolidate the
3 separate typedefs of InfoMap, and clean up multiple spots where QHash<>
is used directly instead of InfoMap.
--
Ticket URL: <http://code.mythtv.org/trac/ticket/10161>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list