Skip to content

Investigation: batched content/media save on import (perf #1) - #994

Merged
KevinJump merged 1 commit into
v17/mainfrom
v17/investigate/batch-save
Jul 12, 2026
Merged

Investigation: batched content/media save on import (perf #1)#994
KevinJump merged 1 commit into
v17/mainfrom
v17/investigate/batch-save

Conversation

@KevinJump

Copy link
Copy Markdown
Owner

Findings doc (no code changes). Decompiled Umbraco 17.3 ContentService to compare Save(item) vs Save(IEnumerable), and traced uSync's import scope handling.

Conclusion: bulk Save is not a safe general win for content/media -

  • the batch overload still writes one row per item (no set-based SQL), so the dominant cost is unchanged;
  • its only saving (N->1 transactions + N->1 notifications) either is already provided by uSync's ambient suppressed scope (DisableNotificationSuppression = false), or, in the default config, directly conflicts with the per-item failure isolation that default is intentionally designed to give;
  • it also drops per-item error attribution and two validations.

Recommends leaving the (already-present but dormant) bulk hook off for content/media and using the existing config levers instead.

Findings doc (no code changes). Decompiled Umbraco 17.3 ContentService to
compare Save(item) vs Save(IEnumerable), and traced uSync's import scope
handling.

Conclusion: bulk Save is not a safe general win for content/media -
 - the batch overload still writes one row per item (no set-based SQL), so
   the dominant cost is unchanged;
 - its only saving (N->1 transactions + N->1 notifications) either is already
   provided by uSync's ambient suppressed scope (DisableNotificationSuppression
   = false), or, in the default config, directly conflicts with the per-item
   failure isolation that default is intentionally designed to give;
 - it also drops per-item error attribution and two validations.

Recommends leaving the (already-present but dormant) bulk hook off for
content/media and using the existing config levers instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@KevinJump
KevinJump merged commit 80397ff into v17/main Jul 12, 2026
7 checks passed
@KevinJump
KevinJump deleted the v17/investigate/batch-save branch July 12, 2026 18:22
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.

1 participant