Make the thumbnails while the originals are still in hand
An import read every byte of every original, uploaded them, and then left the grid to fetch a preview range back out of each one over the network — for files that had been on this machine minutes earlier. The pixels are now made from the bytes already in memory, on the fast path FR-CAT-3 names: locate the camera's own embedded JPEG, decode a few hundred KB, downscale, orient. Never a demosaic. A file with no usable preview yields none, which is not an error and simply leaves the grid to fetch one later. The filing waits for the upload, and only the filing. The shard store is keyed by `oc:fileid` (FR-NC-5) and that does not exist until the server has the file — so the thumbnail is made from the local copy and held until an id can be attached to it. One listing per folder supplies every id at once, rather than a PROPFIND per photograph over a link that may be mobile data. Best-effort throughout: a thumbnail that cannot be filed costs the grid one preview fetch later, and failing an import over it would be the wrong trade. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -323,6 +323,12 @@ where
|
||||
let context = context.clone();
|
||||
window.on_import_open(move || {
|
||||
let Some(w) = weak.upgrade() else { return };
|
||||
// The button that reaches here is hidden where this is false, so
|
||||
// arriving anyway means a key binding or a stale window state.
|
||||
// Refused rather than shown empty.
|
||||
if !dr_plat::imports_supported() {
|
||||
return;
|
||||
}
|
||||
// Re-read the settings file for the same reason the settings page
|
||||
// does: another instance may have written it since.
|
||||
*ctl.settings.settings.borrow_mut() = ctl.settings.store.load();
|
||||
|
||||
Reference in New Issue
Block a user