mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 09:26:43 +00:00
The prefs_usage test skipped prefs.rs entirely, so it never saw Session::apply_prefs read performance.effectCacheMb, and the working setting stayed in HIDDEN_UNTIL_IMPLEMENTED. The test now scans the `impl Session` blocks of prefs.rs, as the scorecard's prefs audit does, and the setting is shown again. With the field visible, the web build could take a budget up to 65536 MB, more than wasm's 4 GiB address space, so the cache could grow until allocation aborts. The new Performance::effect_cache_budget_bytes caps it at WASM_MEMORY_USAGE_CAP_MB on the web, as effective_memory_usage_mb does, and converts with saturating_mul: on wasm32 the old `mb << 20` truncated mod 4 GiB (4096 MB became 0, 5000 MB became 904 MB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>