EPG update time
#1
### Describe the feature
EPG update runs every 5 minutes , despite the setting (defaulted with 120 min). Getting guide for many channels is an high cost operation for the backend and can get more than 5 minutes to retrieve the range of data. Is the reason of the setting and its default value (120 min).

## Expected Behavior
When you realize that one EPG file can have, for example, 10 MB, it will be downloaded for 250+ days, which is 2.5 GB + completely unnecessary.

In this case, a check would be sufficient, for example, once a day / at startup / if the data ends.

## Actual Behavior
An EPG update bumps the backend every 5 min.

## Possible Fix
Check only once a day / at startup / if the data ends / maybe just respect the settings in PVR
Reply
#2
> EPG update runs every 5 minutes , despite the setting (defaulted with 120 min).

This is not quite correct.

It runs every 120 min (adjustable GUI setting) for every channel that already has EPG data and it tries to obtain initial EPG data for channels not yet having EPG data every 5 min (advanced setting).

Not saying that this cannot be improved, just want to make clear how it actually works.
Reply
#3
At this moment, it works so that Kodi download every 5 minutes for an external data source (HTTP etc.).


The best and easiest way I think is to respect the setting for download data:

ImageImage

because internal process for 5 minutes is nowhere to be seen, and from my point of view it is completely useless. It loads resources and the internet.

If you have a different opinion, please explain.
Reply
#4
Well, I think I know Kodi pvr code pretty well and it behaves like I said.
Reply
#5
The problem is not Kodi, which does every 5 mins a GetEPGForChannel addon API request, it seems to be the pvr.iptvsimple addon which downloads whole EPG data every 5 mins although it is asked only for the data for a single channel. So, if Kodi sends 5 GetEPGForChannel requests each for a single channel, iptvsimple seems to download whole EPG for all channels on every request. At least, if setting "cacheepg" is false. That's where the actual bullshit occurs.

=> https://github.com/kodi-pvr/pvr.iptvsimp...a.cpp#L721

I guess, you're seeing downloads every 5 mins, because the firrst GetEPGForChannel call will actually download, there rest of the wave (4 in my example) will be read from cache, after 5 mins, when next "wave" of 5 calls arrives, cache is expired and it reloads data on first call, next 4 of the wave will satisfied from cache, etc...

So, pvr.iptvsimple seems to have some potential to implement EPG stuff more efficient.

That's my opinion - at least if I understand the iptvsimple code correctly (admitting I just had a quick look). :-)
Reply
#6
Ok a this one?

https://github.com/kodi-pvr/pvr.iptvsimple/issues/202
 
Quote:the addon downloads EGP by request from Kodi, if Kodi requests it every 5 min then the addon will do it every 5 min there is nothing to fix in addon's code base

It would be good to figure out where the "problem" is at all :-)
Reply
#7
Sry https://github.com/kodi-pvr/pvr.iptvsimp...-460590435
Reply
#8
Hi, really the kodi behavior is useless. As I said it shouldn't retry to load nothing or try only once time to solve an EIT delay.
In my case this behavior bumps the backend database every 5 minutes and let me pay an electric bill for nails, because always you find at least one channel without epg data.
Reply
#9
Yesterday's statistics, absolutely unnecessary downloads of the XMLTV file - 288x

Image
Reply
#10
I did a deep dive into the code to figure out how it actually works and how settings/advanced settings values can be used to control this and I tried to document actual behavior in the wiki: https://kodi.wiki/view/Advancedsettings.xml#epg

Now, we have at least a real discussion ground. Please lets stop this "is useless" etc. ranting.
Reply
#11
> Yesterday's statistics, absolutely unnecessary downloads of the XMLTV fil

 Please stop that ranting! We all meanwhile get tht the iptvsimple addon is causing this, driven by a epg configuration that is, well not optimal and a epg caching algorithm of that addon, that is, well, not optimal.
Reply
#12
Okay @ksooo , sorry, I'm just sending out how the plugin behaves, no matter how obvious the behavior is, no one knows or no realization.
Reply
#13
Just a quick thought: Maybe all this comes down to just increasing the default value of the advanced setting 'updateemptytagsinterval' to let's say 120 mins (matching the default value of the GUI setting "epg update interval") - at least as a "quick fix" for v18. The only pitfall of this solution would be, that if GUI setting "epg update interval" value is increased by the user to some value greater than 120 mins, the check for channels without EPG will still be done every 120 mins (as long as user does not also increase advanced setting 'updateemptytagsinterval' value.)

How does this sound?
Reply
#14
I still think the best solution (and the most logical) would be for Kodi to respect the option "update interval" of the GUI for data download for PVR.
Reply
#15
*120 minutes is not quite ideal, but definitely better than 5 minutes.
Reply

Logout Mark Read Team Forum Stats Members Help
EPG update time0