perf(gui): Optimize UI rendering loop by iterating over tracks by reference (#88)

* perf: optimize UI rendering loop by removing unnecessary Vec clone\n\n- Removed `clone()` on `self.audio_player_state.tracks` in `draw_header`\n- Iterated by reference instead of using an owned collection\n- Benchmarked and showed a significant performance improvement (7us -> 87ns)

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* build(flatpak): update cargo-sources.json to include criterion\n\nThe CI failed during the offline flatpak build because the newly added `criterion` dev-dependency was missing from `cargo-sources.json`. Regenerated `packages/flatpak/cargo-sources.json` to fix it.

Co-authored-by: arabianq <55220741+arabianq@users.noreply.github.com>

* Delete benches/ui_benchmark.rs

* refactor: remove garbage

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
Tarasov Aleksandr
2026-04-27 23:03:37 +03:00
committed by GitHub
parent fc2cd5e2da
commit 7396c0aef8
+1 -2
View File
@@ -409,10 +409,9 @@ impl SoundpadGui {
return; return;
} }
let tracks = self.audio_player_state.tracks.clone();
let mut action = None; let mut action = None;
for track in tracks { for track in &self.audio_player_state.tracks {
CollapsingHeader::new( CollapsingHeader::new(
RichText::new( RichText::new(
track track