mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #16038] [CLOSED] Performance fixes #14504
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/16038
Author: @bridgemill-ch
Created: 1/17/2026
Status: ❌ Closed
Base:
master← Head:performance-fixes📝 Commits (9)
1e73411fix: Replace unbounded ConcurrentDictionary with IMemoryCache in DirectoryService14dad23fix: Remove blocking async calls in LibraryManager25f872afix: Remove blocking async calls in entity classes91110aafix: Optimize EF Core queries in BaseItemRepository0c34c32fix: Add missing using statements and fix StyleCop orderingd650b14fix: Remove trailing whitespace in BaseItemRepository75ecf03fix: Restore old DirectoryService constructor for API compatibilitye82c3e9fix: Address cvium review feedback - use FastConcurrentLru per TODO, remove Task.Wait, fix async patterns05c559fAdd logging for PR 16038 verification📊 Changes
13 files changed (+501 additions, -64 deletions)
View changed files
📝
Emby.Server.Implementations/Library/LibraryManager.cs(+72 -14)📝
Jellyfin.Api/Controllers/ItemUpdateController.cs(+3 -2)📝
Jellyfin.Api/Controllers/ItemsController.cs(+11 -5)📝
Jellyfin.Api/Controllers/TrailersController.cs(+4 -3)📝
Jellyfin.Server.Implementations/Item/BaseItemRepository.cs(+10 -2)📝
MediaBrowser.Controller/Channels/Channel.cs(+45 -1)📝
MediaBrowser.Controller/Entities/Folder.cs(+132 -1)📝
MediaBrowser.Controller/Entities/TV/Season.cs(+60 -1)📝
MediaBrowser.Controller/Entities/TV/Series.cs(+87 -2)📝
MediaBrowser.Controller/Providers/DirectoryService.cs(+65 -20)📝
MediaBrowser.Providers/MediaInfo/AudioFileProber.cs(+4 -3)📝
MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs(+3 -3)📝
MediaBrowser.Providers/Music/AlbumMetadataService.cs(+5 -7)📄 Description
Title
Fix memory leaks, thread pool starvation, and optimize database queries
Description
Changes
I'm very happy to collaborate on this massive project!
Fixes unbounded memory growth in DirectoryService by replacing ConcurrentDictionary with IMemoryCache. Removes blocking async calls in LibraryManager and entity classes to prevent thread pool starvation. Optimizes EF Core queries by filtering at database level before materialization. Tested with 8+ hour overnight monitoring on 207k file library - memory stable, no crashes, no thread starvation.
Issues
Fixes #11588
Fixes #13165
Fixes #13377
Fixes #13628
Fixes #13708
Fixes #15141
Fixes #15352
Fixes #12740
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.