Repository navigation
M5.6: a slider drag no longer decodes the edited raw again for its filmstrip thumbnail - #1412
Merged
bflatastic merged 1 commit intoOct 13, 2026
Conversation
Each drag tick changed the edited photo's settings, so the filmstrip asked for a new thumbnail render every frame. For an unedited raw shown with its embedded preview, the thumbnail-level source had never been decoded, so each of those renders decoded the whole raw (a 64 MP ARW: over a second), several side by side, and the loupe's drafts queued behind them. - The edited photo's thumbnail is not re-rendered during a slider drag while it has one; it follows once the drag ends. - A thumbnail of a photo whose preview-level source is decoded (the one in the loupe) is cut from that source (SourceRef::Fit) instead of decoding the file again; not when the photo has a denoised picture. Co-Authored-By: Claude <noreply@anthropic.com>
Member
|
Landed on main in #1431. Thank you, @dev-null-undefined! Generated by Claude Code |
Omninovas
pushed a commit
to Omninovas/lightcraft
that referenced
this pull request
Oct 14, 2026
…storytold#1412 left Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bogusyogi
pushed a commit
to Orthic-Labs/ember
that referenced
this pull request
Oct 14, 2026
…storytold#1412 left Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit a5989d6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
The first slider drag on an unedited raw shows almost nothing until you let go: on a Sony ILCE-7RM6 (64 MP), 2 or 3 of a 30-tick Exposure drag's drafts reach the loupe, and the full render arrives 1–4 s after release.
The cause is the filmstrip thumbnail of the photo being edited:
load_bytes(512)in Perf: 64 MP raws decode faster (AHD 1.7×, ARW6 decode, camera-look colour 1.9×, no full-size copy), same pixels #1320).maina newer job for a slot starts beside the running one, so a drag starts several of these decodes at once. They take every worker, and the loupe's drafts wait behind them.Changes
request_thumbasks for nothing while a slider drag is on that photo and it already has a thumbnail. The thumbnail follows on the first frame after the drag ends.SourceRef::Fit, the box filter raw sources are fitted with) instead of decoding the file again. The source is kept in the thumbnail cache, as a decoded one is.max_edgeand decodes as before.Result
main→ this branch. Each value is the median of 3 runs (all 3 runs listed for frames shown). First Exposure drag of the unedited raw, 30 ticks at 60 Hz, GPU drafts, driven headlessly through the real app (session, renderer, job pool, GPU):mainFor comparison, #1302 alone (decodes of one slot no longer run side by side) gives 17–19 of 30 drafts shown and a full render 18–83 ms after release on the same runs. With #1302 a drag still runs one thumbnail decode after another for its whole length: each finished one is already superseded, so its decoded source is thrown away and the next decodes again.
This branch cherry-picked on #1302, against #1302, 3 more runs each (taken while a build was running too):
On top of #1302 the gain is small and mostly within this machine's noise. The decodes no longer run during the drag, though, and the thumbnail after the drag is cut from the preview instead of decoded.
Measured on a Sony ILCE-7RM6 64 MP compressed raw (private photo), an RTX 4070 Ti SUPER (Vulkan) and a Ryzen 7 9800X3D. The app ran under a 4-CPU cgroup quota that other builds kept saturated during every run, so the absolute times are pessimistic and the spread between runs is large. The p90s are 50–80 ms with #1302 too.
Verification
media::tests::a_thumbnail_is_cut_from_the_decoded_preview: a photo whose file nothing can decode, with its preview-level source in memory, gets a 512×341 thumbnail. A 512×341 source, not the preview, goes into the thumbnail cache.render::thumbnail_tests::a_slider_drag_leaves_the_edited_photos_thumbnail_until_it_ends: three drag ticks build no thumbnail job of the photo, and the end of the drag builds one. It fails without the change (checked). The first test can't pass withoutSourceRef::Fit, because nothing can decode the file.cargo xtask ciwithRUSTFLAGS="-A clippy::chunks_exact_to_as_chunks". That lint, new in rustc 1.98's clippy, fires on untouched code onmain(crates/pipeline/src/spots.rs:250, see Issue #989: clippy 1.99, fill_box reads its buffer with as_chunks::<3>() (item 4) #997).cargo test --workspacepasses exceptcatalog::tests_lock::dropping_the_lock_frees_the_library_while_another_thread_spawns_processes. That test spawns/bin/true, which NixOS doesn't have, so it fails onmaintoo. With it skipped, every test passes (--no-fail-fast).Related
git merge-tree).docs/whats-new.md: my same-frame drafts PR (M5.6: with a GPU, a slider drag's preview is drawn in the frame of the drag tick #1413) also adds a 2026-10-13 section. Whichever merges second joins the entries.drag_latencyexample) proposed in M5.7: perf harnesses for slider latency, zoom windows and photo loading (examples only) #1421.