Skip to content

[Performance Regression] Severe price calculation latency in 2.4.8-p4 related to Weee Plugin and Configurable Products #40642

@yasser-moudouani

Description

@yasser-moudouani

Preconditions and environment

Following our upgrade from Magento 2.4.7-p8 to 2.4.8-p4, we are experiencing a critical performance degradation specifically during price rendering on Category Listing Pages (PLP) and Search results.

Steps to reproduce

Core Discovery:
Our performance profiling (Blackfire & New Relic) highlights that 30.5% of the total execution time is consumed by price computing, specifically:
Magento\Framework\Pricing\Adjustment\Calculator::getAmount
Total time in trace: 1524105 ms (Cumulative).

Suspected Root Cause:
We have identified a new Plugin introduced in Magento 2.4.8:
Magento\Weee\Plugin\Model\ConfigurableVariationAttributePriority.

Image

This plugin appears to trigger redundant parent product loads and repetitive WEEE attribute lookups for every child product of a configurable, leading to a massive increase in SQL queries and CPU usage during the getFinalPrice cycle. In our environment, this results in a "N+1" query problem that didn't exist in 2.4.7.

Impact:
TTFB: Increased significantly.
SEO: Massive drop in crawl budget due to page latency.

Could you please confirm if this new WEEE Plugin has known performance issues with large catalogs or configurable products? We need a fix or a recommended patch to optimize how price adjustments are calculated in this version.

Expected result

Pricing Efficiency: The time allocated to Magento\Framework\Pricing\Adjustment\Calculator::getAmount should not exceed 5% to 10% of total execution time, down from the current 30.5%.

Optimized WEEE Logic: WEEE attribute and tax calculations for configurable products should be optimized (via static caching or indexing) to avoid reloading the parent product object during every variant iteration.

TTFB Stability: Price rendering performance should be equivalent to or better than 2.4.7-p8 without major regressions introduced by new tax calculation plugins.

Scalability: The system must handle product listings without the CPU cost of price calculations growing exponentially based on the number of simple variants attached to configurables.

Actual result

N+1 Price Complexity: Rendering a page with 32 configurable products triggers a disproportionate volume of unit price calculations, consuming 30.5% of total CPU time (~1.5s of pure calculation per request).

WEEE Plugin Overhead: The profiler identifies the ConfigurableVariationAttributePriority plugin as a major bottleneck, causing redundant parent object hydrations for every simple variant displayed.

TTFB Degradation: Server response time (Wall Time) has spiked significantly since the 2.4.8-p3 update, making Category Listing Pages (PLP) unstable and slow.

SEO Impact: Excessive latency has caused a massive drop in the Crawl Budget as search engine bots encounter increased response delays.

Additional information

No response

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

    Type

    No type

    Projects

    Status

    Ready for Confirmation

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions