file_model: Improve sort key performance

Don't query for the actual GFile in the list, because we already have
the information from the iterator. Cache the other path segments since
they are likely to be repeated.

On a local SMB share folder with 10,000 images and 4 path segments, this
reduces the loading time from 30 seconds to 1 second.

Fixes #534
This commit is contained in:
Sophie Herold 2025-12-03 23:55:30 +01:00
parent 3b11b0534e
commit 71351a0c03
2 changed files with 69 additions and 34 deletions

View file

@ -0,0 +1 @@
Considerably increased speed for listing other images in folders, especially for remote locations. This allows for switiching to other images to become available much quicker.