[mythtv-users] Live TV Guide Stutter
Jim Stichnoth
stichnot at gmail.com
Tue Sep 17 13:51:18 UTC 2013
On Tue, Sep 17, 2013 at 4:43 AM, Daniel Foster <daniel at df.me.uk> wrote:
> Have you seen this?
>> http://code.mythtv.org/trac/ticket/11020
>>
>> This looks like the issue described to a "T"... I am going to add the
>> Patch to my Atom Frontend Build and see what happens..
>>
>
> That does look very likely - I was looking in roughly the right place!
> Mike is all from packages, but I think I'll have a go at building that in
> and see what happens.
>
> I'm not sure why the free recorders call is needed, as moving to another
> channel in the guide grid doesn't change the tuned channel until enter is
> pressed on it. Some more code reading might be needed.
>
> Here's a section of the stack trace where the free recorder query is being
made:
(gdb) where
#0 TV::IsTunableOn (this=0x164fc50, ctx=0x12ad840, chanid=1042,
use_cache=true, early_exit=true) at tv_play.cpp:8325
#1 0x00007ffff74de93f in TV::IsTunable (this=0x164fc50, ctx=0x12ad840,
chanid=1042, use_cache=true) at tv_play.cpp:8307
#2 0x000000000055606e in GuideGrid::updateChannels (this=0x2484820) at
guidegrid.cpp:1553
#3 0x00000000005577b4 in GuideGrid::cursorUp (this=0x2484820) at
guidegrid.cpp:1878
#4 0x000000000054fc7c in GuideGrid::keyPressEvent (this=0x2484820,
event=0x7fffffffa4d0) at guidegrid.cpp:467
...
For each channel of the guide displayed on the screen,
GuideGrid::updateChannels() is determining whether that channel is
available for tuning so that the theme can display the channel in a
different font, presumably so the user knows whether they can switch to
that channel.
The patch in the ticket is a nice proof of concept, but I don't think
that's how the stuttering problem should be solved. A better approach is
to offload queries like this into a helper thread which later communicates
the changes to the UI thread. Even better, create a QEvent that
periodically polls for the query result and updates the UI elements upon
completion, which avoids extra threads and synchronization.
I also notice slight stuttering when scrolling left/right in the guide with
an ION frontend. No queries are going on when this happens, so I think
it's the latency of creating all the grid items, especially using the
expensive QTextLayout operations. Background processing via QEvents should
be useful here.
Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130917/3581a967/attachment.html>
More information about the mythtv-users
mailing list