-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
Slow preloading of Replicator Field meta data when importing many fieldsets #8395
Comments
Same here. Please Fix! |
@paul-hph Do you have a performance issue in the frontend when clicking through the replicator sets, or is it slow when loading the initial entry from the backend (php-side)? |
Both. 20 second page load. 12 seconds to be able to edit a field. |
Slwo.mp4 |
I'd say I can reproduce this in "small". We only have max 15 replicator sets per page and the more there are, the longer the page load is. Larger pages (10-15) tend to load around 5-10 seconds TTFB and smaller pages (<10 sets) are around 3-5 seconds. |
@paul-hph This seems mostly JS / Vue related and possibly not related to this issue, which is about replicator metadata in php. You page was loaded in about 3-4s (TTFB), which this PR could improve #8397. I would rather open a new issue for the JS part. Are you using lots of Bard sets? Then @jacksleight did some performance checks here in #8716 (comment) |
I just tested your PR @o1y - and I noticed the following changes on some pages:
regarding TTFB times |
Fixed in PR #10280 |
Bug description
When creating a "Page Builder" using a combination of a Replicator and Bard Field with various imported Content Sets, the Replicator Field tends to load slowly. This is especially in situations where sets need to be nested, for example when creating a columns/layout or accordion/collapse set. This results in a performance problem as the Replicator Field needs to preload the same fields over and over.
I have identified two possible causes for this issue:
The
toPublishArray()
method is being executed multiple times for the same fields.cms/src/Fields/Fields.php
Lines 147 to 150 in 62451f1
The
preload()
method of the Replicator Field is loading the same metadata multiple times for the same config:cms/src/Fieldtypes/Replicator.php
Line 203 in 62451f1
I understand that this is a specific case that mainly affects those building Page Builders, like me :) However, I have noticed similar performance challenges mentioned on Discord, and we have also encountered them in our project.
How to reproduce
publish-array-performance
and open the Home entry in the pages collection.Logs
No response
Environment
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
None
Additional details
No response
The text was updated successfully, but these errors were encountered: