AFAICS, this has turned into a “why gnome-photos is slow with large collections”, if there are no crashes. Perhaps that gnome-photos gitlab issue should be reworded to remove mentions of a crash :).
Tracker does all the preemptive gathering that there is here. After your files are indexed, applications like gnome-photos can efficiently perform detailed queries around those files and their metadata (e.g. all photos, photos with landscape orientation, photos above a resolution, photos taken in a time range, photos in an album, …) without having to locate/parse/index all these files themselves.
But even with that part of the work done, gnome-photos still has a number of complex and expensive things to do:
- Opening, decompressing, scaling and cropping each of the individual displayed image files so they can be shown as thumbnails in the UI
- Laying out all these images in the UI
On top of that, gnome-photos still uses GTK3, using widgets whose performance doesn’t scale properly with large data models. Doing some performance analysis is required to definitely pinpoint the parts that are expensive (and sysprof
is the tool that does help here), but my hunch would be that most of the time spent by gnome-photos on large collections is around those areas.
You can get a rough idea of the baseline time taken by Tracker queries running the following command/query:
time tracker3 sparql -b org.freedesktop.Tracker3.Miner.Files -q 'select * { ?u a nmm:Photo }' >/dev/null
This CLI command times a Tracker query for all indexed photos (sending the output to /dev/null). Of course gnome-photos queries to Tracker are more complex than that, it is not 100% impossible to write queries that become a bottleneck on large datasets, but it’s unlikely to be what is happening here.
Cheers,
Carlos