M5.6: a zoomed view keeps the GPU copy of its original while idle (re-uploaded after 3 s)

The idle trim (3 s without renders) released the shared device copy of the original a zoom
window is cut from, so pausing between pans made the next pan upload it again: 800 MB for a
64 MP raw, ~1.4 s of "gpu sample" measured (5 ms when it is still there). While a Detail window
texture is held the renderer is not idle; once the windows are gone (zoomed out, another photo,
or another view, which now frees the Detail view's windows) the trim runs as before.
This commit is contained in:
dev-null-undefined
2026-10-12 14:08:33 +02:00
parent 33accc3892
commit 63bcaa147f
5 changed files with 51 additions and 4 deletions
+1 -1
View File
@@ -267,7 +267,7 @@ the device on their first GPU render. `lightcraft_gpu::ready()` asks without blo
developed image in ~50 ms.
## Memory (M5.6)
A view's stages keep an uploaded source only up to 96 MB (a Preview-level source); a bigger one (the original a zoom window is cut from) is kept once, outside the views' stages, for all views of the photo (the Before and After windows and every pan share it; the Before window of a Before/After waits at first open until the After's job has handed the original over, or each would decode and upload its own copy) and given back when the app idles (issue #323: kept per view it counted against the stage budget on every tick of a drag, and not kept every new window uploaded 288 MB again).
A view's stages keep an uploaded source only up to 96 MB (a Preview-level source); a bigger one (the original a zoom window is cut from) is kept once, outside the views' stages, for all views of the photo (the Before and After windows and every pan share it; the Before window of a Before/After waits at first open until the After's job has handed the original over, or each would decode and upload its own copy) and given back when the app idles with no zoom window on screen (a zoomed view keeps it for its next pan: a 64 MP original is 800 MB to upload again; issue #323: kept per view it counted against the stage budget on every tick of a drag, and not kept every new window uploaded 288 MB again).
- `library.memory` reports what the engine's caches hold (decoded thumbnail / preview / full-size
sources, rendered previews) and the GPU renderer's device buffers (allocated, of which pooled
and retired); `ui.inspect` → `memory` adds the loupe's stage caches (CPU images, GPU buffers)
+3
View File
@@ -10,6 +10,9 @@
- Zooming in with Before/After side by side decodes the original once: the Before side used to decode its own copy
beside the After's, and a window asked for again while the first was still decoding (a pan, the layout settling)
started yet another decode.
- A zoomed view keeps the GPU copy of the original while it is on screen: pausing for a few seconds between pans no
longer frees it, which cost a re-upload of about a second on the next pan (800 MB for a 64 MP raw). It is freed
once you zoom out or move on.
## 2026-10-11