v17 [solved]Alpha 2 - Loading of playlist in music libary takes very long
#1
I just installed Krypton Alpha 2 today. I'm running windows 10 64 bit.

When i open my saved playlists in kodi it takes incredibly long to load that screen. I stopped the time and it was almost five minutes until I could access my playlists. In Jarvis the time was not even noticeable.

I mean kodi home==>music library==>Playlists (or use a shortcut for that)

Here is a log

http://pastebin.com/dB4uF8SN

It would be appreciated if someone could have a look.

Please note that I have music, playlists, mixed playlists (music and music videos), smart music playlists and mixed smart playlists in my saved playlists Smile

Thanks in advance
Reply
#2
The log shows lots of errors
Code:
CArchive::streamin_bufferwrap: can't stream in: requested 4 bytes, was read 0 bytes

Sorry, I've no idea what that is about but let's explore a bit.

Is playlist access always slow, or just the first time after installing? If you run Kodi without any playlist access does the log show any of these errors. I just want to confrm it is playlist access that triggers the error not some other thread. Have you tried v17 a1? Does it have same issue?

Edit:
I'm wondering if it has something to do with the playlists being in an archive created by Jarvis, and then causing errors when trying to read them from archive in Krypton. The playlists themselves are fine between versions, but the archive formats differ. Kodi caches things that take a long time to display, and as you have lots of playlists possibly it cached them. I'm guessing that v17 is picking up an old cache and getting indigestion trying to read it, before reading the playlists a fresh.

Just a theory, I suggest clearing out the cache and seeing if the problem goes away.
Reply
#3
Hi Dave, thanks for the response. I have reverted back to Jarvis for the time being but I can answer some of your questions.

The access was always slow, not just after installing Alpha 2.
I have not tried Alpha 1.
I have provided some logs in this thread http://forum.kodi.tv/showthread.php?tid=281706 I do not find these errors in these. (Maybe you could have a look at that problem too, it touches the music section too, in this case the now playing music list)

And just to make sure I do the right thing with clearing the cache. You mean the cache located in "...Roaming/Kodi//cache", right? Should I delete it before or after installing Krypton? There is indeed a file called "MusicPlaylist.fi" in that folder.

On a sidenote, with all the changes in the music library I was really expecting a rescan of my music library at the first run of Krypton but that did not happen.
Reply
#4
My advice when testing out a new (still under development) version would be to use portable mode, I learnt that the hard way myself. You install somewhere other than "program files" on Windows as you need to be able to write to the sub-folder. Then create a shortcut with -p on the run line that uses a local folder for kodi user data and doesn't mess with your other Jarvis installation etc. I would then copy over any user stuff I wanted e.g. menu/node hierarchy, playlists, databases (to test update path and avoid rescan and scrape), before starting v17 for the first time.

Deleting cache - yes that is the folder, the *.fi files can go. Do it anytime. Old cache can cause all kinds of issues when changing version, I have chased my tail for hours because of it. If you don't go the portable route then a clean out of cache between versions is necessary.

I'm not sure this is the issue, but worth a try.

Quote:On a sidenote, with all the changes in the music library I was really expecting a rescan of my music library at the first run of Krypton but that did not happen.

No it does not force a rescan as that can really upset some people, and Kodi will work as before without one. But you will not get the benefits of the additional tags v17 handles unless you do rescan. Also your music files need to have those tags in them, another reason for not forcing the scan but letting the user initiate it if they know they want to.

My care not to disturb users means that some of the things I have added do remain hidden unless you go look for them. Something I may need to reconsider in light of testing feedback Smile
Reply
#5
I think I'll just make a kodi backup in case anything breaks during testing beyond repair.

I will try out with a cleared cache. I can then provide you with logs from 16.1, 17 Alpha 1 and 17 Alpha 2 when I access my playlists. Do you think this might help to further nail down what's causing this? Any other logs I should provide? Any component-specific logging I should enable additionally? Do you experience the same when you access your playlists in Krypton (in case you use music playlists)?
Reply
#6
Could you point me to the download location of Alpha 1 for windows? I can't find it in the nightly builds.
Reply
#7
Excellent call Dave. Indeed with a cleared cache the music playlists screen loads without a noticeable delay.

Here is a log with 16.1

http://pastebin.com/VpL2pr0Z

17 Alpha 2 with no cleared cache. It took almost eight minutes for the screen to load. The dialogue that appears says "Scanning media information. Loading media information from files... special//musicplaylist/" There is also a progress bar but it does not move until the playlists screen appears.

http://pastebin.com/peLyrwEu

17 Alpha 2 with cleared cache. The screen loads immediately like in Jarvis.

http://pastebin.com/MRhDrZaG

Hope it helps Smile
Reply
#8
So it was all about cache.... Smile

Basically the update instructions for when installing a different version of Kodi over an existing install need to say "delete any cache files". I have no idea what wiki this could go in, perhaps someone else can deal with that?

Now I hope you can enjoy trying out v17
Reply
#9
Is it really feasible for all users to manually delete the cache? I don't have another machine to test on another os but if I used an android machine it's not trivial to delete the cache for the user. Also I would expect few users even read update instructions (neither did I to be honest). The better solution could be to erase the cache automatically when updating but I have no idea if kodi can do that.
Reply
#10
I made a thread in general support so someone else can pick this up from here. Thanks again for the assistance and your ongoing work on the music section. It's greatly appreciated.

http://forum.kodi.tv/showthread.php?tid=281836

Also I agree with your (or the team's) dcecision to not force a rescan of the library. Maybe on the first run a popup message could come up when entering the music library to inform the user, that there are new features and that these require a rescan of the music library? I doubt many users will read the changelogs and your work might go unnoticed.
Reply
#11
(2016-07-06, 19:29)DaveBlake Wrote: So it was all about cache.... Smile

Basically the update instructions for when installing a different version of Kodi over an existing install need to say "delete any cache files". I have no idea what wiki this could go in, perhaps someone else can deal with that?

Now I hope you can enjoy trying out v17

I can add that to the right pages, but that really should be handled by Kodi internally. Platforms such as Android update automatically, and even for other platforms, most users won't read the wiki if they've already done an update in the past. Maybe someone on the team has an idea about how to handle such migrations when v17 does a first run?
Reply
#12
In the absence of any better solution, I would recommend deleting the *.fi files every time Kodi is started.

We already do this in all LE builds (as part of a systemd service, so not part of the Kodi app) and it has eliminated the random crashes (and other weird and hard to explain behaviour) we would sometimes see, and nobody has complained that it has caused a performance regression (ie. nobody notices the initial performance hit to populate caches anew now that caches are not persisted across app restarts).

Longer term Kodi could introduce versioned caches that would be selectively cleared at startup but this involves more work/testing and might be too late for Kodi 17, so as a quick win - and what should be a relatively simple change - I'd suggest clearing all cache files unconditionally during Kodi app startup, because as a solution I know that works...
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#13
(2016-07-06, 13:07)DaveBlake Wrote: My advice when testing out a new (still under development) version would be to use portable mode, I learnt that the hard way myself. You install somewhere other than "program files" on Windows as you need to be able to write to the sub-folder. Then create a shortcut with -p on the run line that uses a local folder for kodi user data and doesn't mess with your other Jarvis installation etc. I would then copy over any user stuff I wanted e.g. menu/node hierarchy, playlists, databases (to test update path and avoid rescan and scrape), before starting v17 for the first time.

Deleting cache - yes that is the folder, the *.fi files can go. Do it anytime. Old cache can cause all kinds of issues when changing version, I have chased my tail for hours because of it. If you don't go the portable route then a clean out of cache between versions is necessary.

I'm not sure this is the issue, but worth a try.

Quote:On a sidenote, with all the changes in the music library I was really expecting a rescan of my music library at the first run of Krypton but that did not happen.

No it does not force a rescan as that can really upset some people, and Kodi will work as before without one. But you will not get the benefits of the additional tags v17 handles unless you do rescan. Also your music files need to have those tags in them, another reason for not forcing the scan but letting the user initiate it if they know they want to.

My care not to disturb users means that some of the things I have added do remain hidden unless you go look for them. Something I may need to reconsider in light of testing feedback Smile

I am SO RELIEVED to find this post. I have been suffering through the SLOW load of my playlists since going with the Krypton nightly builds a few weeks ago. I never knew how to do the portable install and startup, nor was I aware of the need to delete the cache files. This has been a great help. Very nice work on the upgrades to the Music section!
Reply
#14
The PR that clears cache has now been merged, so the current nightly should avoid this issue. However what I said about portable is still good advice, and if changing between older versions then cache will still need to be deleted manually.
Reply

Logout Mark Read Team Forum Stats Members Help
[solved]Alpha 2 - Loading of playlist in music libary takes very long0