Files
pipewire-soundpad/pwsp-gui/src
Tarasov Aleksandrandgoogle-labs-jules[bot] dd13eee0df perf(gui): optimize GUI add_dirs allocations and cloning (#191)
*  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>
2026-09-09 11:30:56 +03:00
..