Magento 2.4.8-p4 Performance Alert: WEEE Plugin Causes Critical Price Calculation Slowdown

Critical Performance Regression in Magento 2.4.8-p4: The WEEE Plugin Strikes Again

The Magento community is buzzing with a critical performance issue identified in the latest Magento 2.4.8-p4 patch, specifically impacting sites with configurable products and WEEE (Waste Electrical and Electronic Equipment) tax enabled. A recent GitHub issue (Issue #40642) highlights a severe degradation in price calculation performance, leading to significant page load latency on Category Listing Pages (PLP) and search results.

The Core Problem: N+1 Queries and CPU Spikes

Upon upgrading from Magento 2.4.7-p8 to 2.4.8-p4, one merchant reported a staggering 30.5% of total execution time consumed by price computing, specifically within the

Magento\Framework\Pricing\Adjustment\Calculator::getAmount
method. This translates to approximately 1.5 seconds of pure calculation per request for pages with just 32 configurable products.

The root cause has been pinpointed to a newly introduced plugin in Magento 2.4.8:

Magento\Weee\Plugin\Model\ConfigurableVariationAttributePriority
. This plugin appears to trigger an 'N+1' query problem, a notorious performance anti-pattern. Instead of efficiently retrieving data, it causes redundant parent product loads and repetitive WEEE attribute lookups for *every child product* associated with a configurable parent. This results in a massive increase in SQL queries and CPU usage during the critical
getFinalPrice
cycle, a behavior not observed in earlier 2.4.7 versions.

Impact on E-commerce Operations

  • TTFB Degradation: Server response times (Time To First Byte) have spiked dramatically, making PLPs unstable and slow.
  • SEO Hit: Excessive latency directly impacts SEO crawl budget, as search engine bots encounter increased response delays, potentially leading to a drop in organic visibility.
  • Scalability Concerns: The system struggles to handle product listings efficiently, with the CPU cost of price calculations growing exponentially with the number of simple variants attached to configurables.

What This Means for Magento Users and Developers

This issue is a critical alert for any merchant or developer planning an upgrade to, or already running, Magento 2.4.8-p4, especially those utilizing configurable products and WEEE taxes. While no community-provided solutions or workarounds are available in the initial comments of the GitHub issue (only bot responses requesting reproducibility on a vanilla instance and Jira creation), the detailed problem description and profiling evidence are invaluable. They provide a clear roadmap for diagnosing similar performance bottlenecks and highlight a potential area for core Magento patches in future releases.

For those experiencing similar symptoms, profiling tools like Blackfire or New Relic, as mentioned in the issue, can help confirm if the

Magento\Weee\Plugin\Model\ConfigurableVariationAttributePriority
plugin is indeed the bottleneck. This insight underscores the importance of thorough performance testing during any Magento upgrade, particularly when new core plugins are introduced.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools