Skip to content

perf: avoid unnecessary list allocation in CheckForIdlePlayback - #17411

Merged
crobibero merged 1 commit into
jellyfin:masterfrom
mbastian77:perf/session-manager-tolist
Jul 25, 2026
Merged

crobibero merged 1 commit into
jellyfin:masterfrom
mbastian77:perf/session-manager-tolist

Conversation

@mbastian77

Copy link
Copy Markdown
Contributor

Summary

Removes an unnecessary .ToList() call in CheckForIdlePlayback.

playingSessions is already a materialized List<T> snapshot; the filtered idle enumerable is only iterated once with foreach, so materializing it into a second list serves no purpose and causes an avoidable heap allocation on every idle-check timer tick.

@sonarqubecloud

Copy link
Copy Markdown

@Shadowghost Shadowghost moved this from Todo to Review in Jellyfin v12 Jul 23, 2026
@jellyfin-bot

Copy link
Copy Markdown
Contributor

Jellyfin API (v 12.0.0)


Result


No differences. Specifications are equivalent

@crobibero
crobibero merged commit 700e53a into jellyfin:master Jul 25, 2026
16 checks passed
@github-project-automation github-project-automation Bot moved this from Review to Done in Jellyfin v12 Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants