docs: Phase 4 done (image asset paging: Tier 1/2 + prefetch)
This commit is contained in:
parent
0883c77e2b
commit
6a788a432e
|
|
@ -466,13 +466,16 @@ the heavy one).
|
||||||
`get_or_decode`/`_cpu` bumps the asset's recency; inserts past budget evict the least-recently-used
|
`get_or_decode`/`_cpu` bumps the asset's recency; inserts past budget evict the least-recently-used
|
||||||
(a miss re-decodes from `asset.data`). Achieves usage-based eviction via render-access recency
|
(a miss re-decodes from `asset.data`). Achieves usage-based eviction via render-access recency
|
||||||
(simpler than the frame→asset enumeration below; that enumeration is only needed for *prefetch*).
|
(simpler than the frame→asset enumeration below; that enumeration is only needed for *prefetch*).
|
||||||
- **[TODO] Tier 1 — lazy/droppable compressed bytes.** Currently `asset.data` is **eager-read** from
|
- **[DONE] Tier 1 — lazy compressed bytes.** `ImageCache` holds the container path (threaded
|
||||||
the container on load (Phase 3.5b). Make it lazy: give `ImageCache` the container path, load bytes
|
App.current_file_path → SharedPaneState → VelloRenderContext) and pages bytes on a decode miss via
|
||||||
on a decode miss via `read_packed_media_readonly(path, asset_id)` (don't eager-read on open → instant
|
`read_packed_media_readonly`; `load_beam_sqlite` no longer eager-reads → instant load, compressed
|
||||||
load; don't accumulate compressed bytes). Wiring wrinkle: the `ImageCache` lives in the stage, not the
|
bytes don't accumulate. `asset.data` is still used when resident (fresh import / old base64 project).
|
||||||
App that holds the container path → thread the path through `SharedPaneState`.
|
*(Refinement: persistent read connection vs open-per-miss.)*
|
||||||
- **[TODO, optional] Prefetch via frame→asset enumeration** (4a below) — only if Tier-2 misses during
|
- **[DONE] Prefetch.** `assets_needed_at(document, time)` enumerates image ids in the visible vector
|
||||||
scrub/playback prove visible; the access-recency LRU already keeps rendered images resident.
|
layers' active keyframes; during playback the stage decodes the ~0.5s-ahead set into the cache.
|
||||||
|
*(Refinements: nested clip-instance recursion; background-thread decode.)*
|
||||||
|
|
||||||
|
**Phase 4 = DONE** (image asset paging by usage + LRU).
|
||||||
|
|
||||||
### 4a. Frame→asset enumeration (incl. nested clips — see note below)
|
### 4a. Frame→asset enumeration (incl. nested clips — see note below)
|
||||||
A function `assets_needed_at(time) -> HashSet<Uuid>`: walk each visible vector layer's active
|
A function `assets_needed_at(time) -> HashSet<Uuid>`: walk each visible vector layer's active
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue