Problem/Motivation

Drupal core 11.3.x added revision caching which means we can improve performance by loading all the revisions if a field item list has multiple items before delegating to deleteRevision on the field item.

Steps to reproduce

Delete a node revision on a node with lots of paragraph revisions in a field.

Proposed resolution

Use existing methods to preload revisions before deleting.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review

These 5 lines of code deliver the same performance benefit as #3584295: Improve performance of deleting a node revision with lots of paragraphs for my test site. So a 25% performance increase in deleting revisions while processing the queue for that module.

berdir’s picture

Status: Needs review » Needs work
berdir’s picture

Title: Improve deleteRevision performance on 11.3 and up » Improve delete and delete revision performance on 11.3 and up
Status: Needs work » Fixed

Merged.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • berdir committed a6576c8b on 8.x-1.x authored by alexpott
    perf: #3584652 Improve delete and delete revision performance on 11.3...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.