Kodi Community Forum

Full Version: Benchmarking Music imports
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've been meaning to do some music benchmarking tests for a while with music imports...

All tests done with 100 random popular FLAC albums over 1gbit network on a NAS on latest Leia Windows Nightly:

Initial Music Scan (universal artist/album scraper enabled)
Result: 7 mins 01 seconds
Accuracy: 90% (assumed due to random Musicbrainz API errors)

Initial Music Scan (TheAudioDB artist/album scraper enabled)
Result: 6 mins 10 seconds
Accuracy: 96% (Looks like errors with apostrophes mainly)

Initial Scan of 100 albums (universal artist/album scraper disabled)
Result: 33 seconds
Accuracy: 100%

Add 1 album to existing library (universal artist/album scraper disabled)
Result: 11 seconds

Add 1 album to existing library (universal artist/album scraper disabled)
2 seconds

But the problem is when I look at my main setup with 10,000 albums it takes 15mins to add a single Album to my existing music library.

I think I will need to do more tests to find out why...
Some tests on my main setup Nvidia Shield, latest nightly, NAS over network

Time to load initial library scan with universal scraper
Result 13hrs+

Time to add 1 new album to library
17mins 43 seconds

Time to add 0 albums to library  Big Grin
17mins 34 seconds

Any ideas how to improve this? I'm thinking adding a "archive" folder for my music and then using the "do not scan to library" option. Or maybe adding local nfo files or something.

Is there anything programatically that can be done to improve it? I seem to remember seeing a test feature on one of dave B's builds at some point that helped...
Yeah, the Shield TV has gigabit but internal storage is slow AF.
(2018-02-04, 16:57)Klojum Wrote: [ -> ]Yeah, the Shield TV has gigabit but internal storage is slow AF.
 Actually I've upgraded the internal disk on my shield to SSD so hopefully its not that.

All files are held on a NAS device in this test, it seems to just be slow with the "loading information from files" process over network.

In fact I don't even see any reason for it to do that as my files are unchanged since the last scan Sad
Quote:But the problem is when I look at my main setup with 10,000 albums it takes 15mins to add a single Album to my existing music library.
I assume that is using  "update library". Kodi is therefore looping through the music files of all 10,000 albums, checking hashes to see if anything has changed.
Quote:Any ideas how to improve this?
The fast route to add a single album is to do a partial rescan: navigate in File View to the folder with the new album, or maybe just the artist (get nearer that all the music sources), select that item  and click on "scan to library" from the context menu.
 
Quote:All files are held on a NAS device in this test, it seems to just be slow with the "loading information from files" process over network.
In fact I don't even see any reason for it to do that as my files are unchanged since the last scan
When it says "loading information from files" it is probably just checking hashes and not loading anything, although if you have "fetch additonal info on update" enabled it will try to fetch data for any artists/albums that it has failed to fetch data for before.
Quote:The fast route to add a single album is to do a partial rescan: navigate in File View to the folder with the new album, or maybe just the artist (get nearer that all the music sources), select that item  and click on "scan to library" from the context menu.

Yep that works well, but what if I have 3 or 4 albums to add each time? Ideally I would like to just click a button and the new ones would be added on a scheduled update.

Thinking about it, I guess it makes sense it takes so long just to check the existing file hashes, since I have so many files... 100,000+
(2018-02-04, 17:39)docwra Wrote: [ -> ]Yep that works well, but what if I have 3 or 4 albums to add each time? Ideally I would like to just click a button and the new ones would be added on a scheduled update.
And Kodi can do that via update library, but to find the things that have been added to your NAS it has to check all 100k music files to see what is new or changed. That takes time of course, but it happens in the background.

What you actually want is new things to appear immediately in the library, how could Kodi do that without you giving it some hint what may have changed?

Quote:Thinking about it, I guess it makes sense it takes so long just to check the existing file hashes, since I have so many files... 100,000+ 
Yes, perfect sense.

When I add music it is usually in an area of my collection, so I can use a partial scan on that area. Also the music files are available from fileview as soon as they are on the NAS drive, so instant playback is possible.

Either set the update library going in the background, and play from fileview while waiting for the scan to complete, or focus the scan on the areas you know have changed.
I didn't realize but the Music source function is missing "Exclude this path from library updates" option in the music source edit screen. I would love to see that implemented one day.

At least then I would not have to scan 5,000 Various Artist albums each time I add an album Smile

The Video library already has this feature and I use it extensively for my different video sources that change less often.