Overview

In recent version of Experience Builder, it looks like there is a performance regression in the backend responses.
We can experience this slowness specially when there are a lot of components on a page.
For example:

  • GET request to /xb/api/v0/layout/xb_page/14 (loading of the page) took around 8s (with SPX enabled). SPX reported 6M of function calls
  • PATCH request to /xb/api/v0/layout/xb_page/14 (after a prop change) took around 14s (with SPX enabled). SPX reported 11M of function calls

Prop change is slow
11.5M function calls on PATCH request

Video of changing prop attached.

Proposed resolution

User interface changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

heyyo created an issue. See original summary.

larowlan’s picture

Version: 0.x-dev » 1.x-dev
Component: … to be triaged » Shape matching
Assigned: Unassigned » larowlan
larowlan’s picture

larowlan’s picture

Assigned: larowlan » Unassigned
Status: Active » Needs review

Can you give the MR a test @heyyo to see if it improves things?

larowlan’s picture

Priority: Normal » Major
heyyo’s picture

StatusFileSize
new196.49 KB

Your MR definitely helps !
PATCH request are 3 times faster after prop change 🔥
In my configuration from 5.42s to 1.82s ( with spx enabled from 18.37s to 6.87s)
And the number of function called during PATCH request went down from 11.5M to 3.47M

XB Speed improvement

I miss the GET request in my first screenshot, it's also awesome boost: 1.3s vs 3.17s so it's 2.5X !

wim leers’s picture

Title: Performance back end regression » Performance back-end regression in `GeneratedFieldExplicitInputUxComponentSourceBase`
Status: Needs review » Reviewed & tested by the community
Parent issue: » #3520484: [META] Production-ready ComponentSource plugins

LGTM! Note that there's many known issues with GeneratedFieldExplicitInputUxComponentSourceBase — see https://www.drupal.org/project/experience_builder/issues/3520484#stable

This in and of itself seems fine, and definitely won't get in the way of that :)

  • wim leers committed 40c10484 on 1.x authored by larowlan
    Issue #3537089 by larowlan, heyyo: Performance back-end regression in `...
wim leers’s picture

Assigned: Unassigned » lauriii
Status: Reviewed & tested by the community » Patch (to be ported)

Thanks for your testing, @heyyo!

IMHO this should be backported to 0.x, but deferring to @lauriii.

  • balintbrews committed 2d4733e6 on 0.x authored by larowlan
    Issue #3537089 by larowlan, heyyo: Performance back-end regression in `...
balintbrews’s picture

Assigned: lauriii » Unassigned
Status: Patch (to be ported) » Fixed
Issue tags: -beta target, -stable blocker

Pushed it to 0.x.

balintbrews’s picture

Issue tags: +beta target, +stable blocker

Didn't mean to remove those tags.

balintbrews’s picture

Issue tags: +backport

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.