EPG Grid performace
#1
Hi All,

Does anyone have any thoughts on how we could improve the performance of the EPG Grid for slower machines.

I have around 600 channels (using TVH) and opening the grid takes nearly 1 second on my Revo, I guess it would take seconds on a rpi. Its find on my laptop but thats pretty powerful.

Any ideas, I have had a look at the code epg/GUIEPGGridContainer.cpp but not sure what the best approach is.

Thanks

Acer Revo 3700
19:49:08 T:140446351775616 DEBUG: UpdateItems completed successfully in 832 ms
19:49:10 T:140446351775616 DEBUG: UpdateItems completed successfully in 826 ms
19:49:13 T:140446351775616 DEBUG: UpdateItems completed successfully in 833 ms
19:49:17 T:140446351775616 DEBUG: UpdateItems completed successfully in 833 ms

Dell Latitude E6520
19:54:14 T:140686186289024 DEBUG: UpdateItems completed successfully in 151 ms
19:54:16 T:140686186289024 DEBUG: UpdateItems completed successfully in 148 ms
19:55:17 T:140684648498944 DEBUG: UpdateItems completed successfully in 155 ms
Reply
#2
we will see whether we could improve the performance Wink .. we'll definitely do some refactoring for the EPG grid.
Reply
#3
2 causes:
- epg grid data is refreshed each time you access the window now because of how the pvr views work. i've hooked up the "onchanged" notifications for this already, and the window should never have to refresh data unless that one is called. now it will refresh most things when you switch views
- epg grid needs refactoring since it's indeed very slow the way it works now, as your log indicates
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#4
Thanks guys.

Let me know if you want me to test or work on anything.

Thanks
Reply
#5
I did get our profiling guy to look into the EPG slowness.

Quote:Well, it looks like the thread that calls dbiplus::SqliteDataset::make_query is doing lots of SQL of the form

Code:
REPLACE INTO epgtags (idEpg, iStartTime, iEndTime, sTitle, sPlotOutline,
sPlot, iGenreType, iGenreSubType, sGenre, iFirstAired, iParentalRating,
iStarRating, bNotify, iSeriesId, iEpisodeId, iEpisodePart, sEpisodeName,
iBroadcastUid) VALUES (856, 1400821200, 1400835600, 'RHS Chelsea Flower
Show', '', 'The winner of the People''s Choice Award is revealed. Billy
Carruthers shares his memories and explains why there is nothing better
than a career in horticulture.', 160, 0, '', 69598864, 0, 0, 0, 0, 0, 0,
'', 49667);
It appears to be doing this for every event in the EPG across all
channels, and runs for a couple of minutes even though there's no
evidence that's it's doing so from the user interface.

This isn't really his area, so he can't help here, but if anyone knows about optimising SQL queries,
then I believe that is where most of the time is going.
Reply
#6
The query looks fine, I guess the main problem is that it's called too often.

@xhaggi: is the issue opdenkamp mentioned (the fact that all views are updated everytime they are accessed) fixed in your rewrite?
Reply
#7
@popcornmix the queries are executed on the background and should only be run in case the data actually changed. it should not block the ui. if it happens more often, then that's a bug. however, on systems that use an sd as storage, like the pi, i recommend disabling the option to write the data to the database in system->pvr->epg.

@negge: his PR is definitely step 1 in fixing it, in case it's not fixed yet after that PR has been merged
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply

Logout Mark Read Team Forum Stats Members Help
EPG Grid performace1