mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #15774] [MERGED] Optimize GetUniqueFlags<T>() #14415
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/15774
Author: @stevenaw
Created: 12/12/2025
Status: ✅ Merged
Merged: 12/12/2025
Merged by: @Bond-009
Base:
master← Head:optimize-GetUniqueFlags📝 Commits (1)
ef73ed6optimize GetUniqueFlags()📊 Changes
1 file changed (+3 additions, -3 deletions)
View changed files
📝
src/Jellyfin.Extensions/EnumerableExtensions.cs(+3 -3)📄 Description
Fixes https://github.com/jellyfin/jellyfin/issues/15773
Changes
Updates this helper to use the generic Enum.GetValues() method which has been internally optimized to use the generic type information efficiently. This and the knock on elimination of two casts make this 8x faster and allocate 1/7 the memory.
Benchmarks
Benchmark Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.