WIP Media importing and library integration (UPnP, Emby, Plex, ...)
I may have found the culprit for the remaining time it takes to write to the database. For ~1k movies it currently takes ~250s to retrieve them and ~90s to write them to the database. If I remove the SQL code which writes the actors of the movies to the database this goes down to ~5s. I tried to break it down further but it seems like the impact comes primarily from the INSERT INTO actor queries which have to be executed a lot because every movie also has around 20 to 40 actors which results in ~30k INSERT INTO actor statements.

Concerning retrieval I have to be honest that I haven't done any profiling there yet. There are several things which could be slow:
  • Retrieving the data via REST API from Emby (JSON) / Plex (XML) servers
  • Converting the data into ListItems
  • Passing the ListItems from the add-on to Kodi core.
So I'll try to find a way to profile these different steps to see which parts are taking long.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply


Messages In This Thread
Unexpected Behaviour - by LongMan - 2015-04-20, 23:53
RE: Media importing and library integration (UPnP, Emby, Plex, ...) - by Montellese - 2021-03-12, 08:23
20.2 Generic Builds - by LongMan - 2023-07-20, 04:49
Logout Mark Read Team Forum Stats Members Help
Media importing and library integration (UPnP, Emby, Plex, ...)10