Repository navigation
Reuse decoded image pixels across imports and edits - #153
Merged
Merged
Conversation
vycdev
force-pushed
the
t3/eliminate-redundant-image-decodes
branch
from
November 16, 2026 18:45
83034f2 to
7898539
Compare
Share the validated import snapshot with the preview, swatches, and build warnings, and decode edited/history URLs once for those consumers. Close validation bitmaps after copying their pixels and discard obsolete loads. Publish dimensions before swatch scanning, add delayed import feedback, and cover decode counts, cleanup, adjustments, edits, and history in tests. Refs #131
Guard preview exports until the selected history entry is ready, while allowing current live touch-up pixels to be used before their URL loads. Crop from the editable original so rapid touch-ups are preserved. Add held-decode regressions for pending undo, baking live touch-ups, and cropping live touch-ups. Update the unreleased import entry. Refs #131
Distinguish pending and failed shared snapshots from an empty workspace, retaining image dimensions and updating feedback during history loads. Schedule a preview render for each loaded canvas independently of swatches. Retain only the latest successful touch-up snapshot until its shared canvas loads. Restore it after an encoding failure, cancel subsequent unsaved strokes, and keep the commit queue usable after thrown encoder errors. Release owned snapshot backing stores when discarded or superseded. Add browser regressions for loading, failed saves, thrown encodes, and failed-load recovery. Update the unreleased import entry. Refs #131
Consume self-commit markers through the most recently rendered commit. Earlier commits skipped by React batching must be restored from history, while newer pending commits retain their live-canvas fast path. Add a browser regression with two saves batched before one render and verify Undo restores the intermediate pixels in Chromium and WebKit. Refs #131
vycdev
force-pushed
the
t3/eliminate-redundant-image-decodes
branch
from
November 16, 2026 19:10
7898539 to
0ccb9ac
Compare
This was referenced Nov 19, 2026
Merged
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.
Choosing or editing an image decoded the same pixels separately for the preview and swatches. Imports now reuse their validation decode, and edits/Undo/Redo load one shared snapshot. The 2D preview, image colors, 3D geometry, Auto-paint analysis, and Palette Proof read the same canonical pixels. This also prevents profiled colors from changing between consumers and collapsing two image regions into one printed layer.
Closes #131.
On the 3888x2916 JPEG fixture, paired production measurements fell from 1,052 to 305 ms in Chromium and 1,427 to 501 ms in WebKit, from file selection to size shown (seven trials per engine, medians on the same Windows machine). Imports use one bitmap decode and zero URL image loads, down from one bitmap plus three URL loads.
Proof: real Chromium/WebKit regressions preserve 8-/16-bit profiled color regions through import, bake, Undo/Redo, and exported 3MF volume/topology checks. Auto-paint and Palette Proof read the same pixels without additional decodes. The failure was reproduced before the fix, and the same fixtures pass after it.
Validation on rebased head
0ccb9ac:Reviewed with sol-loop: 2 rounds with gpt-6.1-sol on xhigh. Sol verdict: approved. The subsequent clean rebase preserved all seven reviewed patches unchanged.
Created with GPT-6.1 Sol in T3 Code (Codex).