Repository navigation
perf(presets): reuse cached text and user preset data - #1222
Conversation
FredApps
left a comment
There was a problem hiding this comment.
Reviewed da06216. No blocking findings. The static built-in text definitions are reused through OnceLock without sharing mutable application state. Custom preset rows borrow the existing Arc catalog, and application payloads are constructed only on activation; expiry, forced refresh, search and undo behavior remain intact.
Independent fresh-build validation passed 2 engine preset tests, 4 preset unit tests and 3 UI integration tests, plus formatting, strict engine/UI all-target Clippy and relevant WASM compilation. Source hashes were unchanged. Two benchmark cases were ignored; no new performance numbers are claimed. WASM emitted the existing State.disabled dead-code warning. No full-workspace or native desktop qualification is implied.
|
Merged, thank you @arnav-hiwarkar! It landed on |
Why
Effects & Presets reparses the built-in text catalog and copies every cached custom preset name and path on redraw. Reuse both catalogs to reduce repeated work, especially for large preset folders.
Scope
OnceLock, shared by listing and application.Arc<Vec<PresetFile>>, filter borrowed rows, and copy apply payloads only on double-click.Verification
CARGO_PROFILE_RELEASE_LTO=false cargo xtask cipassed: 3,400 tests, Clippy, layers, assets, and WASM checks.