WIP Media importing and library integration (UPnP, Emby, Plex, ...)
OK I spent some time profiling the add-on code and the interface to Kodi. For mediaimporter.emby retrieving all items from the Emby server using the REST API is very fast and~90% of the time is spent on putting together ListItems. For mediaimporter.plex retrieving all items from the Plex Media Server (using python-plexapi is rather slow.

So I'm currently focusing on the python interface to Kodi because it benefits all media importer add-ons.
  • With some basic modifications to the code which generates the python bindings I can improve the performance of putting together ListItems by ~25%. As a bonus these changes should also speed up any other python add-on / plugin which operates on ListItems.
  • By introducing more specific interface methods (instead of using methods like ListItem.setInfo() which takes a huge dict and has to take it apart again) I managed to gain another 25%. The problem with this is that they are not save to use for python plugins and other add-ons directly modifying ListItems which have been retrieved from Kodi core. So now the question is whether I should introduce new classes / structures to represent items coming from media importer add-ons to be able to freely improve performance or not. If I would do this it would be a lot more difficult for existing add-ons already using ListItems to integrate media import. Or maybe there is a third way which I haven't figured out yet.
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, 16:12
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