Close, but not quite. The catalog has a UUID for each image known to the catalog. The actual path is known to the local Catalog State database (the one that sometimes needs reintegration) and the UUID is mapped to a path when it's time to show the image.
So, when a contact sheet is displayed, how/when does the system determine if the image is online or not and map the path to the UUID?
and it sounds to me like it makes that determination by querying the path to the image file for each image as it is initially displayed on the contact sheet when the contact sheet loads, as the contact sheet display process iterates through the list of images to be displayed.
So, is the process something like this:
- I request to load a group of images a contact sheet through one of multiple methods currently available
- The DB or some other source (like the filesystem) is queried to build the list of images to be displayed
- A list of images to be displayed is built
- The contact sheet tab and UI elements are displayed, with placeholders for each image in the list of images to be displayed
- As that happens, I can start scrolling through the contact sheet or not
- As image placeholders are displayed in the viewable area of the contact sheet, sources including the DB and filesystem are queried about each image to be displayed in order to retrieve the data about the image that the user has requested to be displayed. Then, the thumbnail for the image is displayed, and then the relevant retrieved image data is displayed for that image thumbnail.
- This process seems to continue until the entire list of images to be displayed has been iterated through
- if, at any point I scroll past the images that have already been loaded, the system either:
- immediately requests and displays the thumbnails for the images newly scrolled into the viewable area and then each image's relevant data
or - waits till the entire list of images has been iterated through and all relevant data has been loaded and then displays the image thumbnails and data for the images newly scrolled to in the viewable area
- or some combination or some other behavior
That would also explain why I see the dots change from unknown to green or yellow when scrolling through a newly opened contact sheet.
It seems to me that when displaying a contact sheet of images that are cataloged, you still pull some amount of metadata about the image from the filesystem while iterating through the list of images to display. I wonder how much of that information could be pulled into the catalog and indexed to cut down on filesystem calls during that iteration and speed up loading the contact sheet when a filesystem is unavailable.
No wonder you're concerned that sorting/filtering would be slow for a large contact sheet with files from many different locations.
That must already slow down contact sheet display for images on a NAS or some other slower storage location.
Also, when PM+ is running, is it holding in memory a list of all known UUIDs? How or when does it compare a displayed image to it's known UUID to see if it is known or not? Or is it an indexed query that can still be run very quickly even when iterating through a large list of images?
Is there a way to, perhaps, remember (dynamically build a list of) the folderpath and parentfolders up to the root of the path to an image as each image is displayed on the contact sheet, and then compare each subsequent image to the dynamically built list of known "online" or "offline" paths, so that if an entire NAS or directory tree is unavailable, for example, any image under that path would very quickly be able to be marked as "offline" without having to be queried for each sort request?
Also, as the list of paths and path parts is built, any subsequent images that have a path that does not match any of the existing paths could also very quickly be marked as unknown as soon as the first image is processed for display -- in addition to comparing it with a list of known UUIDs.
Does all of that make sense?