Skip to content

Backport #21910 to V13#22314

Merged
kjac merged 4 commits intov13/devfrom
v13/feature/content-type-update-performance
Apr 7, 2026
Merged

Backport #21910 to V13#22314
kjac merged 4 commits intov13/devfrom
v13/feature/content-type-update-performance

Conversation

@kjac
Copy link
Copy Markdown
Contributor

@kjac kjac commented Mar 31, 2026

Prerequisites

  • I have added steps to test this contribution in the description below

Description

This is a partial backport of #21910 to V13. Partial because the cache redo for V15 is logically not applicable here 😄

The PR still classifies changes as "structural" or "non-structural". See #21910 for details.

Test results

I've been testing this on a local database with ~10000 pages of the same content type.

  • Without this PR, any content type change takes ~13 seconds to complete.
  • With this PR, a structural change still takes ~13 seconds to complete (no changes), but a non-structural change only takes ~0.04 seconds to complete (it is now reduced to a simple save operation).

Copy link
Copy Markdown
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and aligned with what you did on 17 in the linked PR @kjac, but I've found an issue I believe with removing property types. These are coming out as RefreshOther, which isn't correct.

If I debug line 229 in ContentTypeServiceBase:

var hasAnyPropertyBeenRemoved = dirty.WasPropertyDirty("HasPropertyTypeBeenRemoved");

hasAnyPropertyBeenRemoved is false if I remove a property from the document type.

kjac and others added 2 commits April 1, 2026 08:28
…ContentType.cs

Co-authored-by: Andy Butland <abutland73@gmail.com>
@kjac
Copy link
Copy Markdown
Contributor Author

kjac commented Apr 1, 2026

My bad, @AndyButland 🙈 I forgot to push the backport of #21856, which was a prerequisite for #21910 in V17. It's pushed now.

Copy link
Copy Markdown
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good now, though I was still finding the the removal of a property wasn't leading to the expected RefreshMain change type. I think I found the fix though, and demonstrated it with a failing and now passing integration test - so have pushed that up. Please take a look to make sure it makes sense to you before merging.

Otherwise I've tested the various scenarios of property add/removal, document type name, alias changes, composition and variance changes - and all yield the expected.

@kjac kjac merged commit 24ef23e into v13/dev Apr 7, 2026
19 of 20 checks passed
@kjac kjac deleted the v13/feature/content-type-update-performance branch April 7, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants