Repository navigation
Retire requests with a final page reload - #533
Merged
Merged
Conversation
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
Request.Reloadto queue a page reload, including for pending pages. Events and callbacks run normally until disconnect, and pending pages use the usual ConnectFn setup.This supplies the operation linkdata/jawsauth#20 uses to reload other tabs after logout. Merge this prerequisite first.
Verification
Main versus PR benchmarks
21dc6e5917488a48afc2a00dea031ce948d96938.b31c95d69c8517bd6c029bdef552534161a9fe20(PR533); benchmark commit0db3e57changes only benchmark source.RunParallel, one live Request loop per worker, and waits for each message on the outbound channel. Socket I/O is excluded. Main's copy adds its required key-targeted Update broadcast after enqueueing; PR relies on automatic notification. The eight-worker result is aggregate throughput cost (wall time divided by all operations), not individual-message latency.Run the Go command from each tree's module root, saving output to
/tmp/jaws-wake-main.txtand/tmp/jaws-wake-pr.txt, respectively.Results
Medians below.
~means benchstat found no statistically significant difference.Queue delivery drops from 40 to 32 B/op and from two allocations to one. Request lifecycle adds about 112 B and one allocation (14 to 15) per Request. Maintenance still allocates nothing; dirty fanout stays at 1,296 B and three allocations per operation.
The measured delivery gain includes removing the shared Serve broadcast routing. It is not a network-latency claim. The maintenance fallback adds about 2–4 µs per scan of 1,000 idle Requests in these samples. The one-CPU lifecycle slowdown is significant (
p=0.015); the eight-CPU lifecycle result is inconclusive. Some lifecycle and dirty-fanout samples vary substantially, so their nonsignificant time differences should not be interpreted as regressions or improvements.Full benchstat output