Repository navigation
Performance: start times only for rows in view, cheaper library search - #22
Conversation
…earch Profiled with 3 playlists (6,500 rows) and a 20,000-track library: the UI work per frame while playing went from about 2.1 ms to 0.8 ms. - Start times are worked out only as far as they are needed (the rows on screen, up to the next hour marker that may skip them) instead of for the whole list, twice per frame. The player's hour-marker countdown, the Clock tab and Additional playlist views use the same lazy calculation. - Library search lower-cases each track once per library change, not on every keystroke, and typing more letters only narrows the tracks already shown. - Waveform analysis for smart fading reads files at their own sample rate instead of resampling them first. - Playlist tabs only add up a tab's length when its tooltip is wanted, and hour lines compare hours without building a string per row. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AqiVGDcxKHnYv84gryaby
There was a problem hiding this comment.
MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 1 medium
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
Reviewed by MergeGuard AI
MergeGuard agent actionsFix all findingsAll issues (1)
Apply auto-fixes for the findings above on this branch:
Or reply with |
Conflicts: start times now use the station clock (`Playout::now`), and the Additional playlist view passes `row_missing` to `row_text_color`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AqiVGDcxKHnYv84gryaby
There was a problem hiding this comment.
MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 1 medium
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
Reviewed by MergeGuard AI
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018AqiVGDcxKHnYv84gryaby
There was a problem hiding this comment.
MergeGuard review
Risk: 🟠 35/100 — moderate
Findings: 🟠 1 medium
Open Files changed for 1 inline review thread on the diff.
💡 Use the Fix All MergeGuard Findings checkbox comment on this PR to apply auto-fixes in batch, or reply
@mergeguards fixon any inline finding.
Reviewed by MergeGuard AI
Keeps this branch's server update check (selfupdate, ServerCfg.check_updates) as the one source of ServerInfo.latest and drops #19's second update thread; the release page now comes from the same release. AzuraCast calls from the portal need the AzuraCast permission. Playlist Insert/RemoveRows commands need edit_playlists. The generator's category folder picker (moved to genui.rs) goes through App::pick. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V5uW8ddhUDidYMFx9SLghq
Requested by epell · project thread
Next round of performance work for 0.2.9 ("Continue with performance upgrades").
How it was measured
I ran a release build under a virtual display with 3 playlists (6,500 rows), a 20,000-track library and playback running, then timed each part of the frame and took CPU profiles. While playing, the UI work per frame dropped from about 2.1 ms to 0.8 ms. The two biggest costs were the playlist view (0.9 ms) and the player bar (0.67 ms). Both were adding up start times for the whole on-air list, every frame.
Changes
Playout::starts→Starts::get). Only the rows being drawn are calculated, plus rows up to the next hour marker, because that marker can still mark them as skipped.projected_startsis now built on the same code. The playlist view, the player's hour-marker countdown, the Clock tab and Additional playlist views all use the lazy version.Tests
start_times_worked_out_on_demand_match_the_whole_listchecks that lazy start times match the full calculation for every row. The list has soft, hard and waiting markers, both late and early, and the rows are asked for out of order.any_channel_count_becomes_left_right_pairscovers the analysis input with mono, stereo and 5.1.cargo fmt,cargo build(no warnings) andcargo testall pass. This PR adds no new clippy warnings.Generated by Claude Code