[PR #16164] Cache rules of .ignore files #14547

Open
opened 2026-02-07 07:31:34 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/16164
Author: @TheMelmacian
Created: 2/2/2026
Status: 🔄 Open

Base: release-10.11.zHead: 10.11.z/feature/cached_ignore_rules


📝 Commits (1)

  • ad5db77 feat(DotIgnoreIgnoreRule): cache rules of .ignore files

📊 Changes

2 files changed (+87 additions, -28 deletions)

View changed files

Emby.Server.Implementations/Library/DotIgnoreFile.cs (+8 -0)
📝 Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs (+79 -28)

📄 Description

Added a simple cache for ignore rules to prevent unnecessary re-creations of the same rule set over and over on each IsIgnored check.
This has massively reduced the scan times of one of my libraries that makes heavy use of a large .ignore rule set.
(see linked issue for more info).

Changes

  • added a dictionary that functions as a simple cache for ignore rules
  • after the content of an .ignore file is checked for ignore-rules, the resulting rule list is saved together with the path and change date of the .ignore file
  • on subsequent checks the change date of the .ignore file is compared to the one in the cache and if no there are no changes the rule set is loaded from the cache
  • if the file changed, the rules in the cache are updated

Issues
Fixes #16163


🔄 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/16164 **Author:** [@TheMelmacian](https://github.com/TheMelmacian) **Created:** 2/2/2026 **Status:** 🔄 Open **Base:** `release-10.11.z` ← **Head:** `10.11.z/feature/cached_ignore_rules` --- ### 📝 Commits (1) - [`ad5db77`](https://github.com/jellyfin/jellyfin/commit/ad5db775e8f3672d6a2c581ae780a7afac94aca1) feat(DotIgnoreIgnoreRule): cache rules of .ignore files ### 📊 Changes **2 files changed** (+87 additions, -28 deletions) <details> <summary>View changed files</summary> ➕ `Emby.Server.Implementations/Library/DotIgnoreFile.cs` (+8 -0) 📝 `Emby.Server.Implementations/Library/DotIgnoreIgnoreRule.cs` (+79 -28) </details> ### 📄 Description Added a simple cache for ignore rules to prevent unnecessary re-creations of the same rule set over and over on each IsIgnored check. This has massively reduced the scan times of one of my libraries that makes heavy use of a large .ignore rule set. (see linked issue for more info). **Changes** - added a dictionary that functions as a simple cache for ignore rules - after the content of an .ignore file is checked for ignore-rules, the resulting rule list is saved together with the path and change date of the .ignore file - on subsequent checks the change date of the .ignore file is compared to the one in the cache and if no there are no changes the rule set is loaded from the cache - if the file changed, the rules in the cache are updated **Issues** Fixes #16163 --- <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 07:31:34 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14547