Skip to content

perf(api): reduce database work when starting playback - #1009

Open
ashtonian wants to merge 3 commits into
madeofpendletonwool:mainfrom
ashtonian:fix/playback-settings-query
Open

ashtonian wants to merge 3 commits into
madeofpendletonwool:mainfrom
ashtonian:fix/playback-settings-query

Conversation

@ashtonian

@ashtonian ashtonian commented Oct 18, 2026 •

Copy link
Copy Markdown

Every time the API supplies an episode's playback settings, it makes two sequential database trips: one for the listener's default speed and another for that podcast's settings. This adds avoidable database work to starting playback.

Fetch both together, removing one database trip per request while preserving the chosen speed and intro/outro skip settings. For example, a podcast set to 1.5x still uses 1.5x, and a podcast without its own setting still uses the listener's default. There is no measured end-to-end playback speedup yet.

Validation: all 21 Rust API tests pass when combined with #1010, against PostgreSQL 18 with MariaDB 11.4 and again with MySQL 8.4. Coverage includes default/customized/missing settings and separation between users. Adds CI coverage with disposable databases; GitHub Actions await maintainer approval. No schema migration or runtime dependency is added.

Can land independently of the pagination and streaming PRs.

@ashtonian
ashtonian marked this pull request as ready for review October 18, 2026 02:10
@ashtonian ashtonian changed the title perf(api): resolve playback settings in one database query perf(api): reduce database work when starting playback Oct 18, 2026

This branch has not been deployed

No deployments
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.

1 participant