Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PVR] Guide window: Fix responsiveness on first open. #10814

Merged
merged 2 commits into from Oct 31, 2016

Conversation

ksooo
Copy link
Member

@ksooo ksooo commented Oct 30, 2016

Under special circumstances -- for example if guide window is set as kodi startup window or if opened very(!) quickly after kodi startup -- the window can be experienced as kinda "unresponsive", because due to the async update of the window which is per default every 5 seconds (to avoid unnecessary flickering and cpu load) , it can happen that first epg data are displayed after 5 seconds.

This PR fixes this glitch by introducing an initial boost for the window update.

Second commit just adds some more fail safeness (i once experienced a crash there).

note: pvr.demo + guide window as kodi startup window is nice test setup to test the change.

@xhaggi for review?

@ksooo ksooo added Type: Fix non-breaking change which fixes an issue Component: PVR v17 Krypton labels Oct 30, 2016
@ksooo ksooo added this to the Krypton 17.0-beta6 milestone Oct 30, 2016
@Jalle19
Copy link
Member

Jalle19 commented Oct 30, 2016

Isn't there some way to determine when we can go back to 5 second intervals without having to specify an arbitrary boost parameter?

@ksooo
Copy link
Member Author

ksooo commented Oct 30, 2016

Isn't there some way to determine when we can go back to 5 second intervals without having to specify an arbitrary boost parameter?

atm, i have no better idea. for instance, if you use async epg transfer (pvr.hts supports this), there you never know when an update starts/ends. there is no fixed interval, progress, ... updates just come in at any time. but ofc i'm open for suggestions.

@ksooo ksooo force-pushed the pvr-fix-guidewindow-initial-fill branch 3 times, most recently from d96e550 to 52f7a45 Compare October 30, 2016 16:09
@ksooo
Copy link
Member Author

ksooo commented Oct 30, 2016

@Jalle19 what do you think about this more advanced approach?

Copy link
Member

@Jalle19 Jalle19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 if it works

@@ -695,13 +698,37 @@ CPVRRefreshTimelineItemsThread::CPVRRefreshTimelineItemsThread(CGUIWindowPVRGuid

void CPVRRefreshTimelineItemsThread::Process()
{
// we want this number of refresh calls without new data in a row, before going to normal refresh cycle.
static const int BOOSTED_CYCLES_THRESHOLD = 5;

This comment was marked as spam.

This comment was marked as spam.

iLastEpgItemsCount = iCurrentEpgItemsCount;
}

if (iUpdatesWithoutChange)

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


// in order to fill the guide window asap, use a short update interval until
// BOOSTED_CYCLES_THRESHOLD times in a row we get no more epg events between two cycles.
if (iUpdatesWithoutChange)

This comment was marked as spam.

This comment was marked as spam.

@ksooo ksooo force-pushed the pvr-fix-guidewindow-initial-fill branch from 52f7a45 to 9c9800c Compare October 31, 2016 13:44
@ksooo
Copy link
Member Author

ksooo commented Oct 31, 2016

@xhaggi requested changes are in. good to go now?

@ksooo
Copy link
Member Author

ksooo commented Oct 31, 2016

jenkins build this please

@ksooo ksooo merged commit 0753e63 into xbmc:master Oct 31, 2016
@ksooo ksooo deleted the pvr-fix-guidewindow-initial-fill branch October 31, 2016 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PVR Type: Fix non-breaking change which fixes an issue v17 Krypton
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants