Lightningbeam/lightningbeam-ui/lightningbeam-editor
Skyler Lehmkuhl 39dc402ba3 Phase 3b: bound resident raster pixels with an eviction LRU
Scrubbing a large paint project no longer accumulates every visited frame in RAM.
A fault-in-recency LRU keeps the most-recently-paged-in RASTER_RESIDENT_MAX (12)
keyframes resident and drops the pixels of older *clean* ones (re-arming their
fault-in so they re-page on revisit). The shown frame is always the most-recent
fault-in, so it's never evicted.

Data-loss safety: a new `dirty` flag marks any keyframe whose `raw_pixels` were
mutated by editing (stroke/fill/paint-bucket/floating-lift + their undo/redo) and
is NOT yet in the container. Dirty keyframes are NEVER evicted — they're only
unpinned from the LRU. The flag is cleared on a successful save, which also re-arms
the LRU for the now-clean resident frames so the bound still applies to frames
edited this session.

Also: the save loop now walks all layers (incl. nested) to match the load path's
recursive fault-in arming — evicted frames keep their existing container row
(media_exists), and nested raster keyframes are persisted + covered by live_media.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 17:56:37 -04:00
..
assets Add tool skeletons 2026-03-06 07:22:50 -05:00
examples rewrite unsafe code in ffmpeg ffi 2026-02-15 23:35:30 -05:00
src Phase 3b: bound resident raster pixels with an eviction LRU 2026-06-19 17:56:37 -04:00
Cargo.toml Bump version to 1.0.4-alpha 2026-06-02 14:37:07 -04:00
PLAN.md Toolbar 2025-11-13 18:12:21 -05:00
TOOL_IMPLEMENTATION_PLAN.md Select and move shapes 2025-11-18 00:22:28 -05:00
build.rs Add orchestral sampled instruments 2026-02-21 07:28:19 -05:00