[meta] Improve performance of paragraphs widget

Created on 8 January 2018, almost 7 years ago
Updated 19 August 2024, 4 months ago

Problem/Motivation

The edit form and all ajax actions can get very slow when editing a large form with a lot of paragraphs.

I'm seeing a response time of 8s on a very large client form for initially loading it and 15s for the initial ajax request. Even with having the paragraphs collapsed by defauled, because the biggest problem is the custom validation that we are doing to check if collapsed paragraphs have validation errors and should be set to edit mode. That is 40-50% of the whole request.

Proposed resolution

Investigate alternative options to solve the UX problem of collapsed paragraphs with validation errors or improve how/when we those calls.

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain juanjoespi

    Hi.

    We are having some slow experience in back end too.

    Any help appreciated.

  • 🇵🇱Poland nsavitsky

    Hi guys,

    during my work on multiple projects where paragraphs approach was used to build content, I also noticed that paragraphs widget became slow. And here is the solution I used and am using on current projects.

    The main problem is metatag module and its form, which crazy slows down user interface: https://www.drupal.org/project/metatag/issues/3057523 📌 Content forms are painfully slow if multiple sub-modules are enabled Needs work , especially if you use Schema.org submodules. While performance issue is not solved, you absolutely have to use https://www.drupal.org/project/metatag_async_widget which loads metatags form asynchronously on demand. This small module improved the speed of loading single paragraph for editing from 20s to 0.4s (!).

    Another nice thing, which doesn't affect performance as much as previous module, but still good to use, is already mentioned https://www.drupal.org/project/paragraphs_ee which moves paragraph selection in modal window.

    I strongly suggest using these two modules to improve performance and provide better UI for paragraphs.

  • 🇩🇪Germany Anybody Porta Westfalica

    @nsavitsky thanks for the useful report!

    Maybe you could open an issue for this at Metatag? Sounds like a general issue with AJAX over there, that would also happen in other cases and not only with paragraphs. I think it would be worth further investigations over there!
    Looks like it's another good reason to move metatag_async_widget into Metatags ( 🌱 Move Metatag Asynchronous Widget into Metatags module Active )

    Thank you very much for pointing this out and the useful links. Still, there are likely also other reasons, as discussed above.

Production build 0.71.5 2024