mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-09-20 22:23:31 +00:00
* ⚡ Optimize `add_dirs` method by removing redundant allocations Replaced the `iter().unique().cloned().collect()` pipeline with a simple contains check before pushing to `app_state.dirs`. This prevents entire vector allocations and item clones per user folder pick. Furthermore, saving the configuration and cloning `dirs` is now only performed if the app state actually changed (e.g. if the user picked a new folder). Cleaned up the unused `itertools::Itertools` import. Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com> * ⚡ Optimize GUI `add_dirs` allocations and cloning Replaced the `iter().unique().cloned().collect()` pipeline with a simple contains check before pushing to `app_state.dirs`. This prevents entire vector allocations and item clones per user folder pick. Furthermore, saving the configuration and cloning `dirs` is now only performed if the app state actually changed (e.g. if the user picked a new folder). Cleaned up the unused `itertools::Itertools` import. Cargo.lock was not touched. Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com> --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>