craftcms / cms

Build bespoke content experiences with Craft.
https://craftcms.com
Other
3.27k stars 635 forks source link

[5.4]: Control Panel becomes unusable after update vom Craft 4 to Craft 5 #15844

Closed mfell closed 5 days ago

mfell commented 3 weeks ago

What happened?

Description

First, I’d like to mention that I’ve raised this issue twice: Once on Spicy Web’s GitHub and also on StackExchange. Normally, I avoid cross-posting, but in this case, I felt it might be allowed.

Why: This issue concerns the control panel right out of the box while using Neo. It could potentially be a Neo-related issue, but I’m not sure, and I can’t assess it.

Quick summary: After updating from Craft 4 to Craft 5, the control panel has become unusable, consuming far too many system resources (in my opinion). Yes, I am a heavy Neo user (about 40 (sub-)block types, overall 116 fields), but everything worked perfectly in Craft 4. With the update to Craft 5, the control panel has become unworkable for me. The Neo configuration and content remained unchanged of course.

Perhaps I’ve made a mistake somewhere, but I don’t believe that’s the case. I’m simply using the control panel, having updated Craft to v5, and now the control panel’s performance has changed drastically behind the scenes. This could be a major issue for more complex use cases, which is definitely something you don’t want to experience with.

Image

Steps to reproduce

I know, this is nearly impossible to reproduce for you. But I can offer you admin access to my staging environments for Craft 4 and Craft 5. I can also offer you a complete ZIP with DB dump for DDEV.

Expected behavior

Performant CP.

Actual behavior

Unusable CP.

Copy of StackExchange

I’m a heavy Neo user, and my “content builder” is a Neo field with about 40 (sub-)block types. Overall, I’m using 116 fields in my project, which is a boilerplate for other projects.

With Craft 4.12.x and Neo 4.2.x, I was very satisfied with the performance in the control panel as well as on the frontend (website).

However, after updating to Craft 5.4.x and Neo 5.2.x, the performance of the control panel has slowed down dramatically (on my local DDEV environment), and on my hosting (shared webspace), it’s become completely unusable due to PHP out-of-memory errors.

If I had developed something custom, I wouldn’t be asking for help, but I’m simply using the control panel as provided, out of the box.

In the attached screenshot, you can see a comparison of the debug toolbar between Craft 4 and Craft 5 with the same entry and identical content. The Neo configuration remained unchanged, but the result shows that events, logs, memory usage, and database queries have increased significantly.

I’ve already disabled other plugins, but that didn’t result in any noticeable improvement. When I remove the “content builder” (Neo field), everything works fine again, which leads me to believe the issue is related to Neo. However, since Neo utilizes Craft core functions under the hood, it could potentially be a Craft issue as well—I’m not sure.

Given this problem, I’m hesitant to upgrade to Craft 5 because I’d lose a lot of flexibility in content creation. Has anyone else encountered a similar issue, or am I the only one facing problems with such a (possibly too?) complex configuration?

Craft CMS version

5.4.6

PHP version

8.2.18

Operating system and version

DDEV (Mac)

Database type and version

mariadb:10.4

Image driver and version

No response

Installed plugins and versions

    "craftcms/ckeditor": "4.2.0",
    "craftcms/cms": "5.4.6",
    "doublesecretagency/craft-cpbodyclasses": "3.0.0",
    "doublesecretagency/craft-cpcss": "3.0.0",
    "doublesecretagency/craft-cpjs": "3.0.0",
    "ether/seo": "v5.0.0-rc5",
    "nystudio107/craft-vite": "5.0.1",
    "putyourlightson/craft-dashboard-begone": "3.0.0",
    "robuust/craft-reverserelations": "3.0.0",
    "spicyweb/craft-embedded-assets": "5.1.2",
    "spicyweb/craft-neo": "5.2.9",
    "verbb/field-manager": "4.0.2",
    "verbb/user-group-field": "4.0.0",
    "vlucas/phpdotenv": "^5.4.0",
    "xpertbot/craft-wheelform": "4.0.2"
brandonkelly commented 2 weeks ago

Hi @mfell, would it be possible for you to send us database backups from before and after the upgrade, along with Composer files from before + after? If so, please send those to support@craftcms.com. We can profile both versions and see if that reveals anything.

mfell commented 2 weeks ago

Hi @brandonkelly,

Absolutely, I’m really glad you’re taking on this task! Hopefully, it’s not just a simple mistake on my end.

Please bear with me for a moment while I prepare a download link for you with everything included for both Craft 4 and 5.

mfell commented 2 weeks ago

I just send you an email.

mfell commented 1 week ago

Update 24-10-16

Until now, I was unsure whether this was a Craft-related issue or something specific to Neo. However, it now seems that the solution may lie on Neo’s side.

I’ll keep this ticket updated with any further developments.

ttempleton commented 5 days ago

Confirmed caused by Neo - this issue can be closed.