Kodi library window: First load after boot needs 10 seconds

  • Hello,

    I'm using LE 8.2.4 on a Raspberry Pi v1, with a 32GB Class10 SD-Card. Compared to a Pi v3 the system runs a little slower,

    but still ok for occasionally use.

    BUT:

    After booting the system the first start of the (video) library is very slow. That means after pressing the menu button,

    about 10 seconds nothing visibly happens, then the new window opens including all library entries.

    Currently I am using Amber Skin, but the delay is identical on every other skin, even on default. The system is freshly installed,

    just all unneccesary services (Updates, SAMBA, SSH, AirPlay, etc.) deactivated and the only addon, which I installed is keymap editor

    and Amber skin.

    After the library has beed entered the first time, on next opening there is no more uncommon delay any more - so just on first

    start after booting.

    I tried the same configuration on a Pi v3, due to the extended CPU power the delay on first start is just a couple of seconds,

    but still a moment slower than on futher use. So maybe there could be an issue in my personal configuration...?

    For better solution I activated error loging, the full file ist attached.

    In my opinion the following lines should include the problem:

    Sorry, I do not understand the code so far - but it seems to be a error by the PVR module...?

    I do not use any PVR services on this device.

    Thank you all for trying to help my issue

    Best regards

    Patrick

  • Kodi has a caching mechanism that will save slow queries to local storage for subsequent (in theory faster) re-use, which most likely explains why the initial query takes longer than subsequent queries. The cache folder is cleared when Kodi is restarted so the cache does not persist across restarts/reboots.

    However there are problems with the FileItem cache - at least in latest Kodi 18, and probably 17.6 too - which may mean it doesn't quite work as intended, but this could be skin specific.

    Also bear in mind that after booting the RPi1 will be busy for 1-2 minutes while it starts services in the background etc.

    The PVR errors in your log ("Misplaced [") are most likely skin bugs and should be reported to the skin maintainer.

  • Hello milhouse,

    thank you for your reply - glad to hear that it seems to be a common behaviour on Kodi and no bad configuration on my device...

    The PVR errors in your log ("Misplaced [") are most likely skin bugs and should be reported to the skin maintainer.

    When entering the video library the second time, there's no more PVR error. No chance that that skin error causes the delay?

    Code
    09:36:09.562 T:1944936448   DEBUG: OnKey: return (0xf00d) pressed, action is Select
    09:36:09.563 T:1944936448   DEBUG: Activating window ID: 10025
    09:36:09.563 T:1944936448   DEBUG: ------ Window Deinit (Home.xml) ------
    09:36:09.619 T:1944936448   DEBUG: ------ Window Init (MyVideoNav.xml) ------
    09:36:09.633 T:1944936448   DEBUG: CGUIMediaWindow::GetDirectory (videodb://movies/titles/)
    09:36:09.634 T:1944936448   DEBUG:   ParentPath = [videodb://movies/titles/]
    09:36:09.840 T:1944936448   DEBUG: RunQuery took 125 ms for 435 items query: select * from movie_view
    09:36:10.566 T:1722979232   DEBUG: Thread BackgroundLoader start, auto delete: false
    09:36:10.759 T:1722979232   DEBUG: Thread BackgroundLoader 1722979232 terminating

    Query time is nearly the same on inital load or subsequent load:

    09:33:52.016 T:1944936448 DEBUG: RunQuery took 132 ms for 435 items query: select * from movie_view

    09:36:09.840 T:1944936448 DEBUG: RunQuery took 125 ms for 435 items query: select * from movie_view

    So the only solution will be waiting ... :sleeping:

    Best regards

    Patrick

  • Running LibreELEC 8.2.4 on my shinny new Rpi 3B+ and I also have issues with my library. Browsing is incredibly slow. Moving back and forth through my files (local NAS storage through NFS) takes very long. This is a fresh install. My databases are on MySQL.

    • Official Post

    SkywalkerPD I'm not doubting your current slow RPi situation, but "incredibly slow" is not a bug report we can work with. Start by providing a full debug-enabled kodi.log via pastebin.com (or similar websites). Please do not paste it directly into the forum.

  • SkywalkerPD I'm not doubting your current slow RPi situation, but "incredibly slow" is not a bug report we can work with. Start by providing a full debug-enabled kodi.log via pastebin.com (or similar websites). Please do not paste it directly into the forum.

    I get your comment. Will try to post a debug log somewhere....