2021-03-12, 08:23
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
Concerning retrieval I have to be honest that I haven't done any profiling there yet. There are several things which could be slow:
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
ListItem
s
- Passing the
ListItem
s from the add-on to Kodi core.