Feat: optimizations

This commit is contained in:
2026-02-05 23:15:46 +01:00
parent 5a83c4c1d1
commit 53167e35b6
22 changed files with 175 additions and 215 deletions

View File

@@ -6,8 +6,20 @@ All notable changes to this project will be documented in this file.
### Improved
- Sample library browser: search now shows folder names only (no files) while typing, sorted by fuzzy match score. After confirming search with Enter, folders can be expanded and collapsed normally. Esc clears the search filter before closing the panel. Left arrow on a file collapses the parent folder. Cursor and scroll position stay valid after expand/collapse operations.
- RAM optimizations saving ~5 MB at startup plus smaller enums and fewer hot-path allocations:
- Removed dead `Step::command` field (~3.1 MB)
- Narrowed `Step::source` from `Option<usize>` to `Option<u8>` (~1.8 MB)
- `Op::SetParam` and `Op::GetContext` now use `&'static str` instead of `String`
- `SourceSpan` fields narrowed from `usize` to `u32`
- Dirty pattern tracking uses fixed `[[bool; 32]; 32]` array instead of `HashSet`
- Boxed `FileBrowserState` in `Modal` enum to shrink all variants
- `StepContext::cc_access` borrows instead of cloning `Arc<dyn CcAccess>`
- Removed unnecessary `Arc` wrapper from `Stack` type
- Variable key cache computes on-demand with reusable buffers instead of pre-allocating 2048 Strings
### Changed
- Header bar is now always 3 lines tall with vertically centered content and full-height background colors, replacing the previous 1-or-2-line width-dependent layout.
- Help view Welcome page: BigText title is now gated behind `cfg(not(feature = "desktop"))`, falling back to a plain text title in the desktop build (same strategy as the splash screen).
- Space now toggles play/pause on all views, including the Patterns page where it previously toggled pattern play. Pattern play on the Patterns page is now bound to `p`.
## [0.0.7] - 2026-05-02