QUALITY PATCH

ACSD-68537: Checkout performance degraded when a large number of customer segments were configured

Checkout performance degraded when a large number of customer segments were configured. Quality patch ACSD-68537 for magento/module-customer-segment applies to Magento Open Source and Adobe Commerce 2.4.8 to 2.4.8-p5.

Categories
Customer, Performance
Components
magento/module-customer-segment
Origin
adobe-commerce-support
Since QPT
1.1.77

Issue

Checkout performance degraded when a large number of customer segments were configured.

Steps to reproduce

1. Create multiple customer segments with several conditions and configure them to match ANY condition. 1. Create a cart price rule with a coupon that matches the previously created customer segments and applies a 20% discount. 1. Add a product to the cart on the Storefront. 1. Go to checkout. 1. Perform actions that trigger customer segment evaluation: 1. Register as a customer 1. Enter an address. 1. Update an address. 1. Enter a coupon code.

Adobe's page lists 2.4.8 - 2.4.8-p3 as compatible; the versions below are resolved from the current QPT constraints and are the ones the tool will offer.

Adobe scheduled the permanent fix for 2.4.9.

Install

Install the Quality Patches Tool with composer require magento/quality-patches, apply the prerequisites listed for all files applicable to your distribution and version first, then run vendor/bin/magento-patches apply ACSD-68537. On Cloud, add ACSD-68537 under stage.build.QUALITY_PATCHES in .magento.env.yaml.

For cweagans/composer-patches, choose a compatible version below and download the bundle. Copy its ACSD-68537/ folder into patches/composer/, merge composer.patches.json into composer.json, then run composer install. Bundle prerequisites the same way and list them first. Paths are relative to each package root, using the default -p1 level. Prefer local files when configuring composer-patches; a remote URL can change.

Patch files and compatible versions

Packages across compatible versions (1): magento/module-customer-segment

magento/magento2-ee-base >=2.4.8 <2.4.9

Magento Open Source
—
Adobe Commerce
2.4.8-p5, 2.4.8-p4, 2.4.8-p3, 2.4.8-p2, 2.4.8-p1, 2.4.8
Patch file
patches/commerce/ACSD-68537_2.4.8-p2.patch
  • vendor/magento/module-customer-segment/Model/Cache/CustomerSegmentsCache.php (added)
  • vendor/magento/module-customer-segment/Model/Cache/Type.php (added)
  • vendor/magento/module-customer-segment/Model/CustomerSegmentsProvider.php
  • vendor/magento/module-customer-segment/Model/Segment.php
  • vendor/magento/module-customer-segment/etc/cache.xml (added)

Sources

Łukasz Bajsarowicz
Built by

Łukasz Bajsarowicz, e-commerce architect

Magento and Adobe Commerce architecture, upgrades, performance and audits for merchants and agencies since 2015; magento.watch is the tooling I use on those projects.

Open source, maintained on weekends.