Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revision performance improvements #10589

Merged
merged 2 commits into from
Feb 16, 2022
Merged

Revision performance improvements #10589

merged 2 commits into from
Feb 16, 2022

Conversation

brandonkelly
Copy link
Member

Description

Builds on the changes in #10577, but for revision creation.

When a revision is being created, if it contains any Matrix blocks, those blocks are no longer directly duplicated for the revision. Instead, we create revisions for each of the Matrix blocks, which are assigned to the owner’s revision.

Revision creation still duplicates the element under the hood, so the initial revision creation isn’t much different from the normal block duplication we’ve done previously. However, revisions are only ever created for elements that have been edited since the last time a revision was created. So in effect, Matrix blocks will only ever be duplicated for an owner’s new revision if they have actually been edited.

Here’s a look at the performance gains when saving an entry with 100 blocks and 10 sites:

Three bar charts showing the performance gains that this PR introduces. See the table below for the raw data

Before After
Time 41.36s 1.6s
Queries 13,090 453
Memory 108MB 38MB

Related issues

@brandonkelly brandonkelly changed the base branch from develop to 4.0 February 16, 2022 21:34
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