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
Conversation
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. |
d96e550
to
52f7a45
Compare
@Jalle19 what do you think about this more advanced approach? |
There was a problem hiding this 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
iLastEpgItemsCount = iCurrentEpgItemsCount; | ||
} | ||
|
||
if (iUpdatesWithoutChange) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
||
// 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.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
52f7a45
to
9c9800c
Compare
@xhaggi requested changes are in. good to go now? |
jenkins build this please |
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?