Skip to content

Ask for independent requests together: detail page, playback start, Home - #956

Merged
GLinnik21 merged 3 commits into
plxnative:mainfrom
tiper:perf/parallel-detail-queue
Oct 28, 2026
Merged

GLinnik21 merged 3 commits into
plxnative:mainfrom
tiper:perf/parallel-detail-queue

Conversation

@tiper

@tiper tiper commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

A detail page, a playback start and Home each waited for requests that don't depend on each other. They now go out together (seasons/on-deck/extras beside each other; the play queue beside the plan; Continue Watching beside the hub list), each with the old serial ask as the fallback if a thread can’t start. Two commits, so either can be taken alone. No Plex timing was measured.

tiper and others added 3 commits October 23, 2026 17:56
…est together

A detail page asks for Related beside the item, then a show's seasons,
its on-deck episode and the extras together, instead of one after another.

A playback start asks for its play queue beside the rest of the plan
(the playing item, the server's decision) and applies it at the end of
every exit, since nothing in between reads it.

Signed-off-by: Tiago Pereira <[email protected]>
The deck needs nothing from the hub list, so the two requests go out
together; a failed deck still fails the source, as before.

Signed-off-by: Tiago Pereira <[email protected]>
…beside each other on main's client-taking shape

Resolves the conflicts with main's Sans-IO work (the detail chain and the play queue now take the
client the runner resolved; the queue can continue an existing one) and settles the review of the
PR on top of it.

- plx_base::task::beside: a request asked for on a scoped sibling thread. The scope joins it on
  every exit, a refused thread asks on the caller's thread instead of dropping the work, and a
  panic in the work is re-raised at finish. Every site below uses it, so they share one policy
  (they had Related re-raise while extras and on-deck swallowed).
- Detail page: Related is asked beside the item (it needs only the key), extras and a show's
  on-deck episode beside the seasons, all in one scope, so a movie costs max(item + extras,
  related). A refused item no longer words Related's refusal as a fact about it: fetch_related
  returns the refusal and the caller names it only when the item loaded.
- Playback start: the play queue is asked beside the playing item and the decision in a scope
  around build_stream's body, so every exit joins it and land_queue is the one place its answer
  joins the plan (destructured whole). Main's queue_continuation behaviour is kept inside the
  sibling. The body stays in build_stream, so the Sans-IO ledger keys do not move.
- Home: Continue Watching is asked beside /hubs, but its read-ahead only once the hub list
  answered, so a failing source costs the deck's request and not the read-ahead pages too.

Tests: the queue/decision overlap and an early exit landing the queue (decision_queue_beside_tests),
Related and extras overlap and the refused-item log (metadata_detail_client_tests), the failing
hub list's read-ahead (pms_deck_tests), and beside's own contract (task.rs). track-memory's request
shape compares sorted sets instead of hiding the queue behind a reorder.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit a329aad into plxnative:main Oct 28, 2026
13 checks passed
@tiper
tiper deleted the perf/parallel-detail-queue branch November 2, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants