Slowness / Hangs in Pictures section

For quite some time, I have been experiencing significant slowness and hangs when browsing pictures using Kodi - only on my Odroid N2/+ machines running Coreelec (i.e. not on my Windows PC, for example). It’s so sluggish it basically makes browsing around pictures unusable.

(Of course I realise my Windows PC is massively more powerful than the N2/+, but this behaviour is not normal even for an embedded type of device and in other contexts (fanart whizzing past when borwins 1000+ movies etc), running a pictures slideshow as a screensaver etc) - Kodi on the N2 has absolutely no problem showing and navigating around pictures very quickly. In days past I have used things like Pis, NVidia ION machines etc, so really quite lower things, and they’ve all been fine for browsing pictures.

I’d like to know if others see this same behaviour as a first step to diagnosing the problem. Is it really just Kodi being very slow with thumbnail creation?

The scenario to test is this: a folder full of 100 to 200 images, all of which are JPGs, all that are around 2000 by 1200 pixels - maybe ~500kb each. Mine are on a network folder (accessed using NFS), but I have also tried SMB, no change, and even a local folder on the eMMC drive, no noticeable change either. So it’s not network speed.

When I go into the folder, there is the initial ‘loading media info from files’ dialog pop up (for maybe 1-4 seconds dependingly on the number of images in the folder). Then the photos thumbnails appear and very quickly thumbnails get built (it’s basically instant for the 12 or so displayed on one screen).

I know it’s probably carrying on and building the rest of the thumbnails for the images below that are not currently on screen, but even if I wait at this point for several minutes (so that surely all the thumbs have been built in the background) - the problem is the same - as I navigate between thumbnails, there is a hang for several seconds each time I land on a thumbnail - a hang of 10+ seconds - while the system does not respond to any further input and I can’t even navigate to the next thumbnail. That said, if I turn off the Kodi option for ‘automatically generate thumbnails’ in the Pictures section, I experience no such hangs. So I guess it must be the thumbnail creation, ultimately, but it’s taking a very long time then - 10 seconds+ per image (even though I can see the onscreen thumbnails for the first 12 or so, almost immediately).

If I click OK on an image, it will display it full screen and I can then go back and forth between the full screen images very quickly, again showing there’s no issue with Kodi handling the jpgs as such. It just doesn’t make sense the thumbnail creation is making the system crawl like this!

If I leave it for 10 minutes (hangs still occurring as I move from thumb to thumb at this point), then go out of the pictures section (hit ‘exit’ to go back to the home screen) - then go back into the pictures section - it takes me straight back to the same folder and I can then browse easily and quickly between thumbnails. So something screwy is definitely going on and it’s not per se a machine power thing or network traffic thing or similar - as the machine then has no issue at all once I go back into that same folder as just described.

There’s a log of all this happening here: Dropbox - kodi.log - Simplify your life - but I can’t really see anything in that that relates - it’s clearing making thumbnails etc, but there’s no real indication of any of the lags I am seeing (at first glance anyway). When Kodi is caching a thumbnail, according to the log, that is happening in microseconds, not several actual seconds…