ÃÛ¶¹ÊÓÆµ

[PaaS only]{class="badge informative" title="Applies to ÃÛ¶¹ÊÓÆµ Commerce on Cloud projects (ÃÛ¶¹ÊÓÆµ-managed PaaS infrastructure) and on-premises projects only."}

ACSD-65848: Categories in admin are loading very slow

The ACSD-65848 patch fixes the issue where the total product count in a category was calculated using a sub-select, which delayed category load time. This patch is available when the Quality Patches Tool (QPT) 1.1.66 is installed. The patch ID is ACSD-65848. Please note that this issue is scheduled to be fixed in ÃÛ¶¹ÊÓÆµ Commerce 2.4.9.

Affected products and versions

The patch is created for ÃÛ¶¹ÊÓÆµ Commerce version:

  • ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.8

Compatible with ÃÛ¶¹ÊÓÆµ Commerce versions:

  • ÃÛ¶¹ÊÓÆµ Commerce (all deployment methods) 2.4.8
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your ÃÛ¶¹ÊÓÆµ Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

The Admin category view/edit page experiences significant delays when loading. The delay is caused by the method used to calculate the total product count in a category, which relies on a sub-select query. Refactoring this logic to use a join instead improves performance and reduces load time.

Steps to reproduce:

  1. Create a new ÃÛ¶¹ÊÓÆµ Commerce Cloud instance using version 2.4.8.

  2. Create 2,500 categories and at least 10,000 products:

    1. Copy the setup/performance-toolkit directory to ./var so you can edit the profiles.

    2. Open the small.xml profile and update it to include 2,500 categories and 250,000 products (to match the merchant’s setup).

    3. Run the following command to generate the fixtures:

      code language-bash
      bin/magento
      setup:performance:generate-fixtures var/setup/performance-toolkit/profiles/ce/small.xml
      
  3. After the products and categories are created, make sure all categories are set as anchors. Run this SQL query:

    code language-sql
    UPDATE catalog_category_entity_int
    SET value = 1
    WHERE attribute_id = (
    SELECT attribute_id
    FROM eav_attribute
    WHERE attribute_code = 'is_anchor'
    );
    
  4. In the Admin panel, create a deeper category structure:

    • Move Category 2 under Category 1 to nest it deeper in the tree.
  5. Try to open a category page in the Admin panel using a URL like:
    /admin/catalog/category/edit/id/xx/

Expected results:

Each category page opens on the first try within a few seconds.

Actual results:

Category pages take more than a minute to open.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3