Repository navigation
Conversation
Every preview tile (library and dashboard gallery, collection covers, PDF and batch pickers, the editor's Recent tray, video previews) decoded the full-resolution capture, about 15 MB per tile once on screen, and kept it for the life of the view. A 2-day-old process measured 848 MB footprint, 435 MB of it ImageIO. - Thumbnail.make decodes straight to the tile size with ImageIO. - ThumbnailCache loads previews off the main thread into an NSCache capped at 120 MB; tiles drop their image when scrolled off screen so the cap actually frees memory. - Collection covers no longer decode an image inside body. - Video previews request a tile-sized frame. - Editing a capture invalidates its cached preview. - Batch export releases each full-size image before the next. - Editor undo history is capped at 50 steps (each can hold a full image). Measured: a 40-tile grid of real captures went from +621 MB to +95 MB (3 runs each); fresh launch to the dashboard went from ~160 MB to ~120 MB with no decoded-image memory left.
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.
Snappilot measured 848 MB footprint after 2 days, 435 MB of it decoded images: every preview tile decoded the full-resolution screenshot (about 15 MB per tile) and kept it.
This loads tile-sized thumbnails off the main thread into a cache capped at 120 MB, releases off-screen tiles, fixes collection covers decoding in
body, uses tile-sized video frames, frees images per item in batch export, and caps editor undo at 50 steps.Measured
Tests: 6 new snapverify checks for thumbnail sizing and failure cases; the full suite passes.
Note: CI on
mainalso needs #3 (older-Xcode build fix) merged to go green.