[PR #7346] [MERGED] Optimize Guid comparisons #11174

Closed
opened 2025-12-22 08:35:12 +01:00 by backuprepo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/7346
Author: @Bond-009
Created: 2/21/2022
Status: Merged
Merged: 3/11/2022
Merged by: @cvium

Base: masterHead: guid


📝 Commits (1)

  • f50a250 Optimize Guid comparisons

📊 Changes

66 files changed (+356 additions, -327 deletions)

View changed files

📝 BannedSymbols.txt (+3 -0)
📝 Emby.Dlna/Didl/DidlBuilder.cs (+2 -2)
📝 Emby.Dlna/PlayTo/PlayToController.cs (+16 -8)
📝 Emby.Notifications/NotificationEntryPoint.cs (+1 -1)
📝 Emby.Server.Implementations/Channels/ChannelManager.cs (+7 -5)
📝 Emby.Server.Implementations/Collections/CollectionManager.cs (+1 -1)
📝 Emby.Server.Implementations/Dto/DtoService.cs (+3 -3)
📝 Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs (+1 -1)
📝 Emby.Server.Implementations/HttpServer/Security/SessionContext.cs (+3 -1)
📝 Emby.Server.Implementations/Library/LibraryManager.cs (+19 -15)
📝 Emby.Server.Implementations/Library/MediaSourceManager.cs (+2 -2)
📝 Emby.Server.Implementations/Library/MusicManager.cs (+1 -1)
📝 Emby.Server.Implementations/Library/SearchEngine.cs (+7 -7)
📝 Emby.Server.Implementations/Library/UserViewManager.cs (+3 -3)
📝 Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs (+3 -3)
📝 Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs (+2 -2)
📝 Emby.Server.Implementations/LiveTv/LiveTvManager.cs (+11 -7)
📝 Emby.Server.Implementations/Playlists/PlaylistManager.cs (+4 -2)
📝 Emby.Server.Implementations/Plugins/PluginManager.cs (+1 -1)
📝 Emby.Server.Implementations/Session/SessionManager.cs (+26 -24)

...and 46 more files

📄 Description

  • Use Guid.Equals(Guid) instead of the == override
  • Ban the usage of Guid.Equals(Object) to prevent accidental boxing
  • Compare to default(Guid) instead of Guid.Empty

🔄 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/7346 **Author:** [@Bond-009](https://github.com/Bond-009) **Created:** 2/21/2022 **Status:** ✅ Merged **Merged:** 3/11/2022 **Merged by:** [@cvium](https://github.com/cvium) **Base:** `master` ← **Head:** `guid` --- ### 📝 Commits (1) - [`f50a250`](https://github.com/jellyfin/jellyfin/commit/f50a250cd9fac47bcbd9a05e99c8ffe4d294e320) Optimize Guid comparisons ### 📊 Changes **66 files changed** (+356 additions, -327 deletions) <details> <summary>View changed files</summary> 📝 `BannedSymbols.txt` (+3 -0) 📝 `Emby.Dlna/Didl/DidlBuilder.cs` (+2 -2) 📝 `Emby.Dlna/PlayTo/PlayToController.cs` (+16 -8) 📝 `Emby.Notifications/NotificationEntryPoint.cs` (+1 -1) 📝 `Emby.Server.Implementations/Channels/ChannelManager.cs` (+7 -5) 📝 `Emby.Server.Implementations/Collections/CollectionManager.cs` (+1 -1) 📝 `Emby.Server.Implementations/Dto/DtoService.cs` (+3 -3) 📝 `Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs` (+1 -1) 📝 `Emby.Server.Implementations/HttpServer/Security/SessionContext.cs` (+3 -1) 📝 `Emby.Server.Implementations/Library/LibraryManager.cs` (+19 -15) 📝 `Emby.Server.Implementations/Library/MediaSourceManager.cs` (+2 -2) 📝 `Emby.Server.Implementations/Library/MusicManager.cs` (+1 -1) 📝 `Emby.Server.Implementations/Library/SearchEngine.cs` (+7 -7) 📝 `Emby.Server.Implementations/Library/UserViewManager.cs` (+3 -3) 📝 `Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs` (+3 -3) 📝 `Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs` (+2 -2) 📝 `Emby.Server.Implementations/LiveTv/LiveTvManager.cs` (+11 -7) 📝 `Emby.Server.Implementations/Playlists/PlaylistManager.cs` (+4 -2) 📝 `Emby.Server.Implementations/Plugins/PluginManager.cs` (+1 -1) 📝 `Emby.Server.Implementations/Session/SessionManager.cs` (+26 -24) _...and 46 more files_ </details> ### 📄 Description * Use Guid.Equals(Guid) instead of the == override * Ban the usage of Guid.Equals(Object) to prevent accidental boxing * Compare to default(Guid) instead of Guid.Empty --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
backuprepo 2025-12-22 08:35:12 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#11174
No description provided.