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

[Request] Faster startup when using usb disk (by doing library sync) #145

Open
djay opened this issue Mar 3, 2023 · 0 comments
Open

[Request] Faster startup when using usb disk (by doing library sync) #145

djay opened this issue Mar 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@djay
Copy link
Collaborator

djay commented Mar 3, 2023

Problem

Low end systems, esp sticks using USB really go slow when you have lots of widgets. Why? Most likely because Kodi loads a new instance of the plugin for every widget, all at the same time. Not sure if it's memory/swap or just all the imports or a GIL problem with all the file IO this creats. but the end result is 1+min to see all widgets even if they all come from the same plugin and even if that plugin is caching those lists like AutoWidget can.

Proposed solution

based on ideas from https://github.com/jurialmunkey/skin.arctic.horizon.2/issues/847

AutoWidget Library Sync

  1. Setting to sync all autowidget groups to a library path
  2. On refresh and updating cache after playback write out each AW group as a set of .strm files and a smart playlist file.
  3. do library reindex
  4. in skin widgets point to smart playlist instead of plugin AW group.

note: Seems like its possible to have plugin urls in the strm file but only if it ends up playing episode or movie etc not showing a menu? You can have a dir and .nfo file for a show and just have a single episode in it to speed things up but now the sync process has to open up all the paths to work out what goes to a video and what goes to a menu?

Why?

  • avoids loading any addons at startup which should speedup things considerably. 10 widgets = 10 AW loads even with current caching.
  • doesn't require syncing large numbers of .strm files so library updates time and library ram size should be small
  • updates now involve library update step but is that any less slow than calling AW?
  • better than TMDB helper library sync since you what you sync doesn't have to be on a specific trakt list.
    • smart playlists reflect any path out of any plugin or AW mixing of those.
  • should work for other addons other than video ones? like games?

Solutions considered

TMDBHelpers Library Sync

Syncs your trakt collection + specific trakt lists you specify

  • you then use kodis smart lists to workout your nextup etc?
    cons:
  • you need to sync all episodes on all shows which takes a lot of time. esp to keep up to date.
  • how to get it to work for IAGL or non tv/movie paths?

Wait for subinterpreters speedup in python

https://peps.python.org/pep-0684/

  • may or may not solve the problem?

Kodi should do the caching

It would be super nice if this was a core kodi feature that it just remembered the contents of the widgets and displayed that on start up instead of displaying nothing while waiting for all the addons to return data.

Context

@djay djay added the enhancement New feature or request label Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant