-
Notifications
You must be signed in to change notification settings - Fork 641
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
Matrix blocks causing slow saves and crashes on multi-site installs #9802
Comments
Possibly related to this? #9801 We have also noticed an uptick in updating search engine jobs in the task queue. |
This seems similar and maybe some what related to an issue I posted as a Neo issue. I think the issue I am seeing there is related to how Craft handles things, when saving an entry I presume it has to convert drafts, save a revision and the entry and it all takes time. As this is something maybe more related to Craft, I wonder if there are any optimisations which can be made to help improve the performance of the entries being saved |
This should be drastically improved for the next release, for Matrix fields. Slightly improved for Neo & Super Table as well, and they should be able to fully match the improvements by following suit with a couple of the changes. If you want to help test, change your |
We’re running into this as well on a multi-site install. Changes made in 95fc4df improved things, but it’s still much worse than 3.6. We’d like to update to 3.7, but don’t really want our client to tolerate save times close to 10 seconds. We have a section which is enabled for 8 sites, the matrix field is very simple, one block type only, with an entries and a plain text field. The propagation method is set to “Only save blocks to the site they were created in”. Messured the following performance for the post request when saving an entry in that section.
I don’t know if this is related, but autosave is also slow when it saves the first time (~3000 ms), subsequent autosaves are quick (~500 ms). |
Yeah the change is purely focused on the time it takes to apply a draft’s changes to the canonical entry (whether the draft was normal or provisional), which we were finding to be far worse than the initial draft creation. It won’t help with the initial provisional draft creation (or revision creation), as that involves duplicating the entire entry and all its blocks. You can opt out of the entire autosave feature by setting the |
Ahh… that’s some interesting insights, thanks. You are right, disabling autosave brings me back to 3.6 performance. And as you’ve mentioned revision creation, I was interested to messure the overhead, and ran tests with versioning disabled for that section.
Seems like both features come with quite a cost (on multi-site installs), so good that it’s possible to opt-out. |
Yeah. I have an idea that will seriously improve draft creation performance for 4.0, but it’s a bit too involved to get in before then. Update: found a way to improve revision performance too 🎉 (#10589) |
Craft 3.7.12 is out now with those improvements. |
Nice, I hope your idea works out. And it’s also good to see 4.0 is not only about the big features. Earlier, when I noticed the impact of the revision creation, I was thinking it may be nice to have it running in the background. Don’t know if that’s feasible and if you’d like to put it on the list. |
Yeah that could be a good idea, although it would be a little risky as the entry could be quickly re-edited before the job has a chance to run. |
Just wrapped up that performance improvement idea I had for Craft 4: #10577 |
Revisions too now! #10589 |
Description
What appears to be similar issues have been closed in this and Neo's repositories:
It sounded like people were able to reproduce with Matrix fields, so I wanted to provide a more stripped-down test case with a fresh install of Craft CMS and no plugins.
Steps to reproduce
Results
Creating a new entry in this structure and timing my saves as I entered additional blocks, I clocked the following times:
4 blocks: 3 seconds
8 blocks: 5 seconds
12 blocks: 7 seconds
16 blocks: 8 seconds
20 blocks: 11 seconds
24 blocks: 14 seconds
28 blocks: 16 seconds
The current homepage of the real site we're working on has 93 fields across 21 Neo blocks, and entries are taking upwards of 30 seconds to save/often resulting in a 503 error on our development servers. Given I'm able to repro a 16-second save time on a fresh install with 28 matrix blocks, each containing 2 plain text fields, it feels like this is more likely a Craft issue.
Please let me know if there's any additional information I can provide from my local test site. This issue is really slowing down development on the current site we're working on.
Additional info
The text was updated successfully, but these errors were encountered: