djp952 / pvr.hdhomerundvr

Unofficial Kodi HDHomeRun DVR PVR Client
https://github.com/djp952/pvr.hdhomerundvr/wiki
Other
60 stars 9 forks source link

Very slow loading of guide data #14

Closed rykr closed 7 years ago

rykr commented 7 years ago

I just installed and enabled the plugin and it seems to be working but loading the guide data when i start kodi takes a long time. It's still loading and has been for 2-3 minutes and it's at 40%. I have the dvr service and two hdhr primes that work flawlessly in the hddvr app.

djp952 commented 7 years ago

Hi rykr! The guide data load speed is dependent upon SiliconDust's back-end web services, which are rather slow. The good news is that if you use Kodi frequently it will only load new data, which speeds things up a lot. The first time through or if you haven't used it in a while it gets really painful.

The back-end services are designed for the SD application's 'slice' UI, not a grid UI like Kodi. To load the data for Kodi, I have to make lots and lots of individual calls for every channel, since the most I can get back is 8 hours at a time. So assuming you have 100 channels and want 5 days of guide data, that works out to around 1,500 individual guide data requests. If they took 1 second each (and sometimes they do!) that's 25 minutes of doing absolutely nothing but waiting for data. 25 minutes is a bit extreme, but you get the idea. SiliconDust's application loads the data on-demand as you navigate the 'slice' UI, so you don't really notice that an individual call took 1/2 or a whole second to complete.

If SD ever provides a means to retrieve the guide data in bulk, or at least specify start and end times to get an entire channel at once, that would improve things a lot. But, in the end it's their service, they make the rules, and frankly this PVR kinda violates those rules as it is (they are still letting me get away with it, though).

My recommendation would be to dial down the amount of guide data you want available in the Kodi PVR & Live TV settings. I set mine to 3 days, that seems to be a good balance between being able to know what's coming up and getting a reasonable load time. 1 day is the minimum Kodi allows, that would be the absolute fastest (~3 requests per channel).

I've considered launching multiple web requests concurrently to grab more data, but in practice it didn't help much and added a need to store the guide data in the PVR's local database, which is definitely a violation of SiliconDust's terms.

Sorry there isn't anything I can specifically do for you on this one. Marking this one closed only because the resolution is out of my control ...

PS - For what it's worth, I've noted the guide load has been extra slow the past week or so, there could be something on SiliconDust's end going on too. It will never be FAST, but I agree it's been more painful than usual :(

rykr commented 7 years ago

appreciate the response. I understand. And thanks for your efforts!