Draft
Re-enable remote loop visuals with throttled updates#104
Conversation
Remove the SetVisualUpdatesEnabled(false) workaround from issue #68. Remote loop visual updates are now re-enabled but throttled to 15 Hz to prevent excessive decimation/upload cost. Changes: - LoopRemote::Update() now rate-limits visual model refreshes using steady_clock, re-setting the dirty flag when throttled so updates are retried on the next tick. - StationRemote::SetRemoteInterval() early-outs when length, visual length, and position are all unchanged, avoiding redundant buffer resize and dirty-flag work on each job tick. - Added _intervalVisualLengthSamps to StationRemote for the change guard. The existing vertex-shader architecture (fixed geometry + 1D waveform texture + GPU displacement) means no geometry rebuild is needed per update - only waveform decimation and PBO texture upload. Relates to #68
Restructure LoopRemote::Update() to check the time throttle before clearing _modelDirty, eliminating the exchange-then-re-set pattern that could theoretically race. Also use explicit types per review.
Copilot
AI
changed the title
Re-enable remote loop visuals with throttled updates (issue #68)
Re-enable remote loop visuals with throttled updates
May 31, 2026
Copilot created this pull request from a session on behalf of
malisimat
May 31, 2026 22:59
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remote loop visuals were disabled entirely (
SetVisualUpdatesEnabled(false)) as a temporary workaround for severe slowdown during NINJAM sessions. This removes the workaround and re-enables visuals with proper rate-limiting.Changes
Update()checks elapsed time before consuming the dirty flag. Deferred updates retain_modelDirtyfor the next tick rather than exchange-then-re-set.SetRemoteInterval()early-outs when length, visual length, and position are all unchanged, eliminating redundant resize/dirty-flag work on each job tick.Notes
_MaxVisualUpdateHz(15.0) is tunable if real-world testing shows it's still too aggressive.allowUnchangedSkipinLoopModel::UpdateModelprovides an additional early-out for playing-state loops where nothing has changed.