perf: adaptive frontend polling intervals (closes #43) #46
No reviewers
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#46
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch ":fix/adaptive-polling-issue-43"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changes
setIntervalwith adaptivesetTimeoutchain — 1s during active deployments (building/deploying), 10s when idlesetTimeoutchains instead ofsetIntervalfor clean dynamic interval switchingHow it works
_schedulePoll()checksisDeployingstate and sets the next poll delay accordingly. When deployment state changes (detected infetchAppStatus), the timer is rescheduled immediately to switch between fast/slow polling without waiting for the current interval to expire.Reduces idle polling from 4 requests/second to ~0.4 requests/second (10x improvement).
CI Results
Tests ✅
All tests pass.
Lint ⚠️
One pre-existing issue (not related to this PR):
No new lint issues introduced.