Skip to content

perf(jellycompat): fast-paths for slow Jellyfin-compat queries from production log analysis #246

Closed

Description

@CoffeeKnyte

Tracking issue for a batch of Jellyfin-compat performance/correctness fixes derived from a 3-hour production log window (2026-06-29 08:27–11:27, ~62k requests), where the jellycompat surface accounted for 473 of the 500 slowest requests.

Scope (each its own commit, each adversarially reviewed):

  • /UserItems/Resume (Continue Watching): up to 91s → <100ms via the native capped continue-watching fetcher.
  • /Shows/{id}/Episodes AdjacentTo: ~13s on large soaps → <100ms via a bounded prev/self/next query.
  • /Items played-history (IsPlayed=true): ~15s → <100ms via SQL type+library push-down.
  • /Items/Latest (no parentId): ~2s → <100ms via per-library index walk + in-memory merge.
  • Detail-field list rows (MediaSources/Chapters): per-item GetItemDetail N+1 → batched.
  • Blank home hub rails: swallowed SQLSTATE 42703 on episode_catalog_entries → fixed, plus a defense-in-depth guard against podcast episodes leaking into TV episode-scope sections.

Goal: sub-100ms hot paths, reusing existing Silo fast paths, accepting reduced Jellyfin fidelity only where safe (never reduced access control).

Activity

  1. CoffeeKnyte commented on Jul 2, 2026

    @CoffeeKnyte
    ContributorAuthor

    Resolved by the linked PR, which has been merged. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions