-
Notifications
You must be signed in to change notification settings - Fork 117
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
ElementalArea gridfield performance issues #368
Comments
For reference, I'm testing this (in CWP 2.1) on a page with 100 blocks in one ElementalArea. Response times: 11.2s, 11.5s, 11.18s It's a long way off what you're reporting, but that could be because you're using container blocks like layout blocks/the list block. It's still too slow. |
Ok so 50% of the request time when loading the CMS page edit form is calling My baseline is 2.69s with ElementalAreasExtension disabled, and 8.82s with it enabled and the fix in #376 in place. There's still 6.13 seconds to render 100 blocks on a page in the CMS - still some room for improvement. |
Ok I've tried a few other things:
None of these have made a very significant change in response time at all. The bulk of the remaining time is in My last profiling shows the following notable changes:
Profiles:
Most relevant: I can make a PR for the getPage() calls being cached, 300ms is 300ms... everything else is irrelevant. Edit: pushed into #376 @mfendeksilverstripe thoughts? FYI I actually have 101 blocks on this page, not 100 😉 |
@robbieaverill Nice work! I see you PR is already merged. I will pull the latest elemental version and will test it out. Many thanks :) |
Ok thank you! |
@robbieaverill Tried to test it out. I upgraded to
To be fair, I don't think this is related to your changeset, but I suspect something changed in Elemental code because this is more about Fluent and Elemental working together. It would be great if we could either push your performance improvement to |
@chillu Since the issue is related to |
I did some further investigation into the query issue. The problem is how the page gets loaded from the database. Also, the query issue was introduced in Robbie's code. I made following changes which remedies the query issue: silverstripe-terraformers@dc42675 I was finally able to test the actual performance improvements :). My test page load went from |
Thanks @mfendeksilverstripe for the real-world example testing. Using I might get a chance to look into it a bit this afternoon - if not I guess @robbieaverill will be able to come up with a solution. |
@ScopeyNZ We had a little discussion about this issue within the team. Our guess is that the This issue may be completely unrelated to elemental - it can be related to Core and Fluent interaction. it's worth noting that if we currently upgrade to latest elemental, it will break our project. |
Yes I think I've seen this issue with If you're talking about elemental |
Oh I see, we need to add the model name prefix - my fault for being lazy =( |
@mfendeksilverstripe #377 should fix it, sorry about that |
@robbieaverill Do you think there's more to action on in this issue? If not - feel free to close it. PRs have been merged 🙂 |
I think we've mostly done all that we can. I think that #347 would help too, but we've squeezed most of the low hanging fruit out of this ticket now. @mfendeksilverstripe feel free to reopen the issue if you think there's more that can be achieved here. |
Thanks for the help all. The performance improvement is really helpful. |
@mfendeksilverstripe How much is this improving performance for you? Are you still dependant on the RFC: Restructure data models from Robbie? |
@robbieaverill @unclecheese Has either of you tested this on the codebase @mfendeksilverstripe is working on? Has it fixed the 30-50s load times which he described in the issue originally? |
@chillu My test page load went from |
OK, reopening - 32s is still bad. |
I noted that these changes were shaving off pretty much all that could be done easily. I think the remaining time could be a combination of things - CMS, versioned, fluent, subsites, elemental, etc etc. We can reinvestigate this anyway though and see where improvements can be made. cc @brynwhyman |
The thing is that "edit forms are slow" is tracked through this issue for the original reporter. And that is not fixed. If there's diminishing returns on elemental, then we need to identify other means to research, and highlight them to the reporter. But we can't have it drop off the radar completely. Maybe it'd be more efficient to have private issues with the highlevel problem statement in an area ("edit forms are slow"), and then branch out to specific issues. Note that we already have a "cms performance" epic on the Open Sourcerers board: https://app.zenhub.com/workspace/o/silverstripe/silverstripe-admin/issues/571 |
We have made a few caching PRs, including a piece of pseudo-wizardry from @unclecheese which optimistically caches elemental relationships to speed all of this up. Everything has been merged, but I'll leave this open for @mfendeksilverstripe and his team to validate. |
Fixed in the project code |
Version:
^3.0.0 (5334f5709878a3502e1cee431c58a28c36f9a843)
It seems that elemental area gridfield does not scale well with the number of blocks contained inside it. I tested this on a page with 56 blocks. Here are the results:
28.4s
CMS page load withElementalArea
field removed51.6s
CMS page load withElementalArea
field removedThat's quite a difference. It's probably worth investigating why is the difference so large.
The text was updated successfully, but these errors were encountered: