{"data":{"id":"ACSD-65848","source":"qpt","sourceRef":"magento/quality-patches@1.1.84","title":"Fixes the issue where the total product count in a category was calculated using a sub-select, by refactoring the method to use a join instead.","categories":["Performance","Catalog/Product"],"components":["magento/module-catalog"],"origin":"adobe-commerce-support","documentation":{"url":"https://experienceleague.adobe.com/en/docs/commerce-operations/tools/quality-patches-tool/patches-available-in-qpt/v1-1-66/acsd-65848-categories-in-admin-are-loading-very-slow","path":"help/tools/quality-patches-tool/patches-available-in-qpt/v1-1-66/acsd-65848-categories-in-admin-are-loading-very-slow.md","blobSha":"eb1485b705cc6b4304f17a24d19a2086c033b3e0","description":"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.","stepsToReproduce":"1. Create a new Adobe Commerce Cloud instance using version 2.4.8. 1. 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. 1. Open the small.xml profile and update it to include 2,500 categories and 250,000 products (to match the merchant's setup). 1. Run the following command to generate the fixtures: bin/magento setup:performance:generate-fixtures var/setup/performance-toolkit/profiles/ce/small.xml 1. After the products and categories are created, make sure all categories are set as anchors. Run this SQL query: UPDATE catalog_category_entity_int SET value = 1 WHERE attribute_id = ( SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'is_anchor' ); 1. In the Admin panel, create a deeper category structure: * Move Category 2 under Category 1 to nest it deeper in the tree. 1. Try to open a category page in the Admin panel using a URL like: /admin/catalog/category/edit/id/xx/","introducedInQpt":"1.1.66","createdFor":["2.4.8"],"documentedRange":"2.4.8","scheduledFixRelease":"2.4.9"},"files":[{"package":"magento/magento2-base","constraint":">=2.4.8 <2.4.9","path":"patches/os/ACSD-65848_2.4.8.patch","blobSha":"8b4a2ee71915661779a96adcd340e4da23afbb1a","url":"https://raw.githubusercontent.com/magento/quality-patches/11d565bdde197b9c7bac859a5698e99098b48457/patches/os/ACSD-65848_2.4.8.patch","thirdParty":false,"modifies":[{"path":"vendor/magento/module-catalog/Model/ResourceModel/Category/Collection.php","change":"modified","package":"magento/module-catalog"}],"packages":["magento/module-catalog"],"hasTests":false,"applicableVersions":{"magento-community":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8"],"magento-commerce":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8"],"mage-os":[]},"unknownVersions":[],"requires":[],"replacedWith":"ACSD-67643","deprecated":false}],"applicableVersions":{"magento-community":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8"],"magento-commerce":["2.4.8-p5","2.4.8-p4","2.4.8-p3","2.4.8-p2","2.4.8-p1","2.4.8"],"mage-os":[]},"conditions":null,"requirements":null},"_documentation":"https://magento.watch/api","_description":"Quality patch ACSD-65848 details"}