Skip GC when a query is paused#39
Merged
Merged
Conversation
Deactivating a query always scheduled garbage collection. A temporary pause (signalium's PauseSignalsProvider, or a network-driven pause) with a low gcTime evicted the query immediately and recreated it on resume, dropping its polling interval. Read the isPausing flag signalium now passes to RelayHooks.deactivate and skip GC while pausing. The active fetch and subscription are still torn down; only GC is skipped, so the cached result survives and resume reuses it. GC still runs on a genuine teardown. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pzuraq
approved these changes
Jun 12, 2026
signalium shipped the isPausing flag in a patch (3.0.3), so tightening the peer floor is backward compatible within the 3.0.x line, not breaking. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
Deactivating a query always scheduled garbage collection. A temporary pause (signalium's
PauseSignalsProvider, or fetchium's own network-driven pause) with a lowgcTimeevicted the query immediately, so resuming built a brand-new query and lost its polling interval, causing a burst of redundant subscriptions.Change
deactivatenow reads theisPausingflag signalium passes and skips GC while pausing:So the active fetch/subscription is still torn down on pause; only GC is skipped, and resume reuses the cached result.
Dependency
Requires the new
DeactivateOptions(isPausing) argument onRelayHooks.deactivatefrom signalium: Signalium/signalium#242. CI typecheck will fail until that lands and is released.Patch changeset included.