henryjfry / repository.thenewdiamond

9 stars 4 forks source link

IMDB Lists loading time. #14

Closed kolekan closed 1 year ago

kolekan commented 1 year ago

Hi mate. Thanks for your work on this addon. I just want to ask if you can take a look on imdb lists loading time. It takes almost 70 seconds to load a list of 100 items. Maybe a pagination option make things better.

henryjfry commented 1 year ago

Are you opening the IMDb list from one of the video add-on screens rather than the program add-on fancy gui?

I just loaded the IMDb best sci-fi movies: 16749887414733553245980654722480

Which has 67 items and comes back very quickly.

The video add-on screens are slow and my advice is not to use them.

When it loads as a video add-on the lists aren't paginated specifically so they can be used for widgets.

There is a limit option you can add to a widget or favourite plugin call.

But loading every list page takes as long as it takes. And it's actually the Kodi loading part which is incredibly slow. All the information gets cached but Kodi still takes as long to load a cached listitem as it does uncached.

The IMDb list load is actually very quick, a long list will scrape in less than 20 seconds.

The program add-on screens are paginated at 20 items per page and not being standard Kodi video add-on screen load much faster and actually use cached information.

henryjfry commented 1 year ago

So this isn't an issue and I'm going to close it.

Also just tested the video add-on screens. A long list will take some time to load as it will need to cache every single item.

But once it's been cached it should load a lot quicker.

kolekan commented 1 year ago

OK i understand. Can you add then a setting giving the option to deactivate custom imdb list items from viewing in video-addon list only?

henryjfry commented 1 year ago

What do you mean? Disable any of the IMDb lists from showing up in the video add-on list at all? Or keep them in the video add-on list but have them open to the fancy UI screen?

I could do either but I don't see what specific benefit that brings? Any long list will take a significant length of time to load, IMDb takes longer because it has to scrape an actual webpage but once all the entries are cached it loads quick enough.

And if you want to get to an IMDb list in the GUI you can select it from the menu. It's also possible to setup a favourite to go straight to it in the GUI.

To aid with that there is a setting option which logs all the plugin URLs when you enable it and load the video addon. So that's partly why I don't want to disable them in the video addon.

So what do you actually want it doesn't already do?

kolekan commented 1 year ago

Let's say i don't want all imdb list items fill addon main menu. There are almost 40 imdb lists in my custom imdb json file.

henryjfry commented 1 year ago

Ok, I'll maybe look into putting them on their own page.

henryjfry commented 1 year ago

Ok so I've figured out how to add them to a sub page of the add-on so I'll push an update next time I get a chance

kolekan commented 1 year ago

Great thank you!