Repository navigation
feat(web): tune legacy polling intervals and switch to sequential short polling for async jobs - #916
Merged
Conversation
…rt polling for async jobs - Reduce polling interval for WatchPopup and WatchInspections from 1000ms to 500ms for quicker UI updates. - Remove client-side artificial delay in OpenWorkbench and FilterTimeline legacy polling adapters, relying on sequential short polling with at most 1 in-flight request. - Add unit test verifying OpenWorkbench polling progression until READY stage.
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
August 27, 2026 04:48
Contributor
There was a problem hiding this comment.
Code Review
This pull request adds a unit test for adapting OpenWorkbench and reduces the polling delay from 1000ms to 500ms in adaptWatchPopup and adaptWatchInspections. It also removes the polling delays entirely in adaptOpenWorkbench and adaptFilterTimeline. The review feedback warns that completely removing these delays can cause tight polling loops (busy-waiting), potentially leading to high CPU usage and server load, and suggests retaining a small delay of 100ms instead.
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.
Summary
This PR adjusts the polling intervals and timing behavior in
legacy-polling.interceptor.tswhen legacy polling fallback is active:State Observation RPCs:
WatchPopup: Reduced polling interval from 1000ms to 500ms for faster UI popup notifications.WatchInspections: Reduced polling interval from 1000ms to 500ms for faster reflection of inspection list changes.Async Job RPCs:
OpenWorkbench&FilterTimeline: Removed client-side fixed wait delays (delay(300, req.signal)) inside the polling loop, adopting sequential short polling. Because requests are sequentially awaited (while (!req.signal.aborted)), concurrency is strictly limited to at most 1 in-flight request at all times.Tests:
adapts OpenWorkbench and yields stages until READYto verify multi-stage polling progression and clean termination without cancellations inlegacy-polling.interceptor.spec.ts.Testing
make test-web(All 862 tests pass)make lint-webmake format-webmake test-gomake pre-commit