From fa90c6cc1ebf121c79aa6e5c499b845e1e94ac4b Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 15 Oct 2026 00:23:25 +0200 Subject: [PATCH] CopiedHoldIds: the copied.Length == 0 early-out is deleted; an empty copy runs the loop zero times Co-Authored-By: Claude Sonnet 5.5 --- src/GameCult.Caching/CultCache.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GameCult.Caching/CultCache.cs b/src/GameCult.Caching/CultCache.cs index 45f1343f..9d491704 100644 --- a/src/GameCult.Caching/CultCache.cs +++ b/src/GameCult.Caching/CultCache.cs @@ -4280,7 +4280,7 @@ namespace GameCult.Caching // order, so the decode runs only where it can change the answer. private bool CopiedHoldIds(Durable? durable, CultPersistedRecord[] copied, IReadOnlyCollection upserts) { - if (durable == null || copied.Length == 0 || + if (durable == null || string.Equals(durable.Snapshot.FormatVersion, CultPersistedStoreSnapshot.FormatV3, StringComparison.Ordinal) || upserts.Any(staged => staged.HoldsIds == true) || AttachedRegistry is not { } registry)