Port #997 and #998 (dictionary + sealed/Lock perf work) from v17 - #1019
Merged
Conversation
(cherry picked from commit 1d06d7c)
Records the SyncChangeInfo sealing, which is a (minor) extender API change: it stays protected so handlers can still construct one from an IsItemCurrentAsync override, but can no longer be derived from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks
This was referenced Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings #997 (avoid unneeded dictionary operations) and #998 (use
System.Threading.Lock, sealinternal/privateclasses) ontov18/main.Cherry-picked rather than merged:
v17/mainandv18/maindiverged back at v17.3.2 and there are ~20 unrelated v17 commits between them, so a merge would drag in far more than these two. Both commits are recorded with-x, so they trace back to the v17 originals.#997applied clean.#998had two conflicts:SyncHandlerRoot.SyncChangeInfo— v17 has itprivate, and #998 sealed it. v18 promoted it toprotected(with docs) becauseElementHandleroverridesIsItemCurrentAsyncand constructs one. Resolved asprotected sealed: keeps v18's accessibility and #998's devirtualization intent. It's only ever instantiated, never derived from, so nothing in the codebase is affected — but it is a (minor) extender API change, so it's noted in the changelog.uSync.Core/Json/OrderedPropertiesJsonResolver.cs— deleted in v18 by #1014 when the JSON helpers moved toJumoo.Json, and modified by #998. Resolved by keeping it deleted; the v18 build uses theJumoo.Jsonversion. The only surviving mention is a comment inJsonSerializerOptionsTests.Verification
Checked every class #998 sealed against the ported tree — 20 of 21 present, the one absent being
OrderedPropertiesJsonResolveras above. All the#997hunks applied identically to v17, includingMergeIgnoreDuplicates'sContainsKey+Add→TryAdd(a different code path from the folder-merge work in #1017, so no overlap).Solution builds clean; 210 tests pass.
Note
Not part of the port, but flagged while porting:
PublishableContentHandlerBase.ClaimItemForExport(added in #1018) useslock (state)on the notification-state dictionary. That's locking on a shared object rather than a dedicatedLock, which is exactly the pattern #998 moved away from inTemplateWatcher. It can't useSystem.Threading.Lockas-is — the object being locked is Umbraco's dictionary, not ours — but it's worth a look if the sealing/locking cleanup continues.🤖 Generated with Claude Code