Skip to content

Slow category loading due to configurable product swatches  #39073

Open
@ioweb-gr

Description

@ioweb-gr

Preconditions and environment

  • 2.4.7-p1

Steps to reproduce

Create a website with many configurable products (we have around 4m total products including variations) and each one should have at around 250 variations.
Finally load a category with 30 products while the cache is not fresh.

The page will take too long to load > 20s

Initially on Magento 2.4.6 we realized it was the swatches display which we disabled afterwards.

However when we upgraded the problem became apparent once again due to the swatches being loaded even if disabled in the backend.

Expected result

Page loads fast

Actual result

By profiling with blackfire we noticed that the system spends a lot of time in loading option prices

image

Resulting in 5 seconds of queries extra in the load apart from cpu processing.

By checking the renderer.phtml template we notice it's loading swatches configuration even if they're not enabled in the backend configuration option.

Additional information

There are two issues to solve here

  1. Performance with swatches enabled
  2. Disable loading the swatches in the category if the configuration option is not enabled in the backend

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: PerformanceComponent: CatalogIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P3May be fixed according to the position in the backlog.Progress: ready for devReported on 2.4.7-p1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions