perf(queue): deliver queued items immediately instead of waiting for the poll - #38848
Open
silverwind wants to merge 1 commit into
Open
perf(queue): deliver queued items immediately instead of waiting for the poll#38848silverwind wants to merge 1 commit into
silverwind wants to merge 1 commit into
Conversation
…the poll LevelDB and Redis cannot notify their reader, so PopItem polled with a backoff that settles at 2s once a queue goes idle. Every queued operation waited for the next poll before it was even picked up. A push now wakes the popper. PopItem reports an empty queue instead of waiting, the single consumer does the waiting, and the poll remains only as a fallback for items no local push announced. Assisted-by: Claude Code:claude-opus-5
Member
Author
|
Describe a better design and I will implement. This is a minor issue but was noticed during #38847. |
Contributor
|
There should be no
|
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.
On an idle instance a new notification took up to 2s to reach the browser. The queue reader polled with a backoff settling at 2s, a pushed item sat until the next poll. It now wakes on push, poll kept as a fallback.
Notification badge latency: 810-1820ms before, 108-247ms after.