Repository navigation
Conversation
Contributor
Dash performance benchmarks✅ all within thresholds
growth = late-third / early-third per-op time; ~1 is flat, a large value means the per-op cost scales with accumulated state. machine scale vs baseline: 0.69x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on |
|
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.



Under load, ASGI streaming callbacks could stop after about 10 seconds with only part of their frames: the client got
doneearly.A downlink's close reads the connection record (is it still mine?), then writes it closed. Those are two round trips. When the browser's next downlink opened between them, the stale close overwrote the live open record, and the pumps cancelled the live streams once
DOWNLINK_GRACEpassed. With 4 uvicorn workers onLocalSharedStorageat 4000 streaming browsers, this cut 1-2% of streams.The newest downlink of a page now owns its record (records carry
opened):DOWNLINK_GRACE / 2and writes it open again only when an older downlink closed it. It never writes over an open record or a newer downlink's, so a relay whose client vanished unnoticed can't keep a page alive.opened(written by an older Dash) is left alone.Load test (4 uvicorn workers,
LocalSharedStorage, 4000 browsers, 20 frames per stream): 28 to 74 incomplete streams per run before (6 runs), none after. The extra cost is oneagetper open downlink every 5 seconds.Tests in
tests/streaming/test_stream_transport.py:test_stale_close_does_not_end_a_live_downlinkreplays the interleaving. It fails without the fix.test_relay_of_a_gone_client_does_not_keep_the_connection_alivechecks that a stale relay can't mask a browser that left.test_refresh_in_flight_does_not_reopen_a_closed_downlinkchecks that a repair landing late can't reopen a closed record.test_closed_record_from_an_older_dash_is_left_alonecovers records from an older Dash.