Every catalog change gave the grid a new list of photos, and it read every
photo of it again: each one's date group (a lookup, a date parse and a
string) and its cell's shape. At 180,000 photos that was a 100 ms frame for
every batch an import added.
- catalog: Catalog::date_runs is split into date_group (one photo's own
group) and date_runs_of (the stack rule and the runs), which the grid
uses too.
- ui: GridCache keeps what it read of each photo of the list, position by
position. A new list that differs by the photos the catalog says an edit
touched is read again only for those; anything else (another view,
order or grouping, a stack) is read whole. The square grid reads no
shapes. A 16-photo batch at 181,749 photos: 101 ms -> 7 ms.
Co-Authored-By: Claude <noreply@anthropic.com>