Skip to content

Reduce Discord RPC polling churn#149

Open
valipuha wants to merge 1 commit into
NextFire:mainfrom
valipuha:fix/reduce-rpc-polling-churn
Open

Reduce Discord RPC polling churn#149
valipuha wants to merge 1 commit into
NextFire:mainfrom
valipuha:fix/reduce-rpc-polling-churn

Conversation

@valipuha

Copy link
Copy Markdown

Summary

  • collapse the Apple Music polling path into a single JXA status call per loop
  • avoid re-sending identical Discord activity unless the track changes, playback position jumps, or temporary artwork expires
  • remove hot-loop reconnect/state logging so the background service does less steady-state work

Why

Issue #88 reports that the process RSS keeps growing over long runs even when heap snapshots do not show a clear JavaScript leak. This change reduces the two biggest sources of steady-state churn in the loop: repeated osascript invocations and repeated Discord RPC/log updates for the same track.

Validation

  • deno fmt --check music-rpc.ts
  • deno lint
  • deno check --allow-import music-rpc.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant