[PR #6096] [MERGED] Remove some unnecessary allocations #10819

Closed
opened 2026-02-07 06:27:16 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/6096
Author: @cvium
Created: 5/24/2021
Status: Merged
Merged: 6/12/2021
Merged by: @Bond-009

Base: masterHead: saving_private_ram


📝 Commits (8)

  • 42a2cc1 Remove some unnecessary allocations
  • 1580bf5 Fix property instantiation order
  • 2d5ed7c Apply suggestions from code review
  • 3b5214e Update Emby.Naming/Video/VideoListResolver.cs
  • 0835b26 review
  • cfba7da revert test change
  • 9111730 More review
  • 66de842 Use stackalloc in Format3DParser.Parse

📊 Changes

44 files changed (+1124 additions, -888 deletions)

View changed files

📝 Emby.Naming/TV/EpisodeResolver.cs (+2 -3)
📝 Emby.Naming/Video/ExtraResolver.cs (+1 -1)
Emby.Naming/Video/FlagParser.cs (+0 -53)
📝 Emby.Naming/Video/Format3DParser.cs (+36 -52)
📝 Emby.Naming/Video/Format3DResult.cs (+9 -14)
📝 Emby.Naming/Video/StackResolver.cs (+1 -3)
📝 Emby.Naming/Video/VideoFileInfo.cs (+4 -3)
📝 Emby.Naming/Video/VideoListResolver.cs (+139 -94)
📝 Emby.Naming/Video/VideoResolver.cs (+27 -33)
📝 Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs (+19 -15)
📝 Emby.Server.Implementations/Data/SqliteItemRepository.cs (+286 -221)
📝 Emby.Server.Implementations/Data/TypeMapper.cs (+3 -13)
📝 Emby.Server.Implementations/IO/ManagedFileSystem.cs (+10 -10)
📝 Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs (+1 -1)
📝 Emby.Server.Implementations/Library/LibraryManager.cs (+25 -23)
📝 Emby.Server.Implementations/Library/MediaSourceManager.cs (+3 -6)
📝 Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs (+6 -11)
📝 Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs (+6 -6)
📝 Emby.Server.Implementations/Localization/LocalizationManager.cs (+22 -12)
📝 Emby.Server.Implementations/Serialization/MyXmlSerializer.cs (+2 -1)

...and 24 more files

📄 Description

Changes

  • string -> readonlyspan
  • String.Concat() -> StringBuilder
  • Format3DParser, VideoResolver, VideoListResolver -> Static classes
  • FlagParser -> Removed
  • GetOrAdd -> Overload without closure allocations
  • Foreach -> For
  • LINQ -> List.Find(All), For etc.
  • Etc.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/6096 **Author:** [@cvium](https://github.com/cvium) **Created:** 5/24/2021 **Status:** ✅ Merged **Merged:** 6/12/2021 **Merged by:** [@Bond-009](https://github.com/Bond-009) **Base:** `master` ← **Head:** `saving_private_ram` --- ### 📝 Commits (8) - [`42a2cc1`](https://github.com/jellyfin/jellyfin/commit/42a2cc1747c7859c63334a7a45792e0af1410e1a) Remove some unnecessary allocations - [`1580bf5`](https://github.com/jellyfin/jellyfin/commit/1580bf5469bdd517c5451f213500cf8af235c5f1) Fix property instantiation order - [`2d5ed7c`](https://github.com/jellyfin/jellyfin/commit/2d5ed7cb9574180d6ae5617f82abdfd43064ebee) Apply suggestions from code review - [`3b5214e`](https://github.com/jellyfin/jellyfin/commit/3b5214e59526095057a7761ca6c8edb5a5af1d1f) Update Emby.Naming/Video/VideoListResolver.cs - [`0835b26`](https://github.com/jellyfin/jellyfin/commit/0835b26889e1b26d3bd00abfb076da3b6eb4424e) review - [`cfba7da`](https://github.com/jellyfin/jellyfin/commit/cfba7daa50296b41d550b2041f9878721696263b) revert test change - [`9111730`](https://github.com/jellyfin/jellyfin/commit/9111730a0a836e2c0753c5fe00a8fac87a173584) More review - [`66de842`](https://github.com/jellyfin/jellyfin/commit/66de8428960ec751521386c27e37909cf73add9e) Use stackalloc in Format3DParser.Parse ### 📊 Changes **44 files changed** (+1124 additions, -888 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Naming/TV/EpisodeResolver.cs` (+2 -3) 📝 `Emby.Naming/Video/ExtraResolver.cs` (+1 -1) ➖ `Emby.Naming/Video/FlagParser.cs` (+0 -53) 📝 `Emby.Naming/Video/Format3DParser.cs` (+36 -52) 📝 `Emby.Naming/Video/Format3DResult.cs` (+9 -14) 📝 `Emby.Naming/Video/StackResolver.cs` (+1 -3) 📝 `Emby.Naming/Video/VideoFileInfo.cs` (+4 -3) 📝 `Emby.Naming/Video/VideoListResolver.cs` (+139 -94) 📝 `Emby.Naming/Video/VideoResolver.cs` (+27 -33) 📝 `Emby.Server.Implementations/AppBase/BaseConfigurationManager.cs` (+19 -15) 📝 `Emby.Server.Implementations/Data/SqliteItemRepository.cs` (+286 -221) 📝 `Emby.Server.Implementations/Data/TypeMapper.cs` (+3 -13) 📝 `Emby.Server.Implementations/IO/ManagedFileSystem.cs` (+10 -10) 📝 `Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs` (+1 -1) 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+25 -23) 📝 `Emby.Server.Implementations/Library/MediaSourceManager.cs` (+3 -6) 📝 `Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs` (+6 -11) 📝 `Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs` (+6 -6) 📝 `Emby.Server.Implementations/Localization/LocalizationManager.cs` (+22 -12) 📝 `Emby.Server.Implementations/Serialization/MyXmlSerializer.cs` (+2 -1) _...and 24 more files_ </details> ### 📄 Description <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** - string -> readonlyspan<char> - String.Concat() -> StringBuilder - Format3DParser, VideoResolver, VideoListResolver -> Static classes - FlagParser -> Removed - GetOrAdd -> Overload without closure allocations - Foreach -> For - LINQ -> List.Find(All), For etc. - Etc. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:27:16 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#10819