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

Improve startup speed / Cache channels #280

Open
c-kr opened this issue Apr 19, 2020 · 4 comments
Open

Improve startup speed / Cache channels #280

c-kr opened this issue Apr 19, 2020 · 4 comments

Comments

@c-kr
Copy link

c-kr commented Apr 19, 2020

On every kodi startup a new channel sync with the backend is started. For 100+ channels in favourites, it takes about one minute to complete.

I set "Channel and groups update mode" to disabled and would expect that once the initial channel search is completed, channels would only read from a local cache file in kodi's userdata.

Is it possible to implement this? A logic like:

If "Channel and groups update mode" == disabled
And "local channel cache file exists":
Use this channels instead of querying backend

@phunkyfish
Copy link
Member

Channels and groups update mode is a nightly check for new channels so not what you think.

Where is local channel cache file found?

@c-kr
Copy link
Author

c-kr commented Apr 19, 2020

Channels and groups update mode is a nightly check for new channels so not what you think.

Ok, then maybe implement another option "Channel cache max age" where the supplied number is the max age of a local channel cache file in hours (0 = disabled). If older: query backend and create new cache file, if younger: use file instead.

Where is local channel cache file found?

I am not that deep into the code but writing this file probably needs to be implemented first, if neither kodi or the addon keeps channels on disk (only in memory)

@phunkyfish
Copy link
Member

The problem with this is that all the data from the E2 box is dependent on the bouquets, timers are validated etc. All based on the channels. If you don't read them all the time then can we trust everything else that is read.

I can't imagine it's the channels that is taking the time. Most likely it's the EPG data on startup.

@phunkyfish
Copy link
Member

I had a further look at this. Unfortunately the add-on must load the channels each time it starts as it needs to store the state, it can't just read them from kodi's cache. Storing this state locally would be over engineering the problem I think. Is the 60 seconds really that big of an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants