Skip to content

Category product count loading issue #40044

Open
@akhileshpatel-dev

Description

@akhileshpatel-dev

Preconditions and environment

Magento Version 2.4.8-p1

Issue Summary

The Magento core class Magento\Catalog\Model\ResourceModel\Category\Collection::loadProductCount() does not handle large datasets efficiently.

In my case, there are 800+ categories, each containing 500–600+ products. When accessing the Admin > Catalog > Categories page, the system gets stuck while trying to load product counts, resulting in excessive load times.

Highlighted function is responsible for this issue

Image

Steps to reproduce

Steps to Reproduce

  • Log in to the Magento Admin panel.
  • Create more than 500 categories.
  • Assign 500–600+ products to each category.
  • Navigate to Catalog > Categories in the Admin panel.

Expected result

The Categories page in the Admin should load quickly, similar to environments with a lower number of categories and products.

Actual result

The page takes more than 3 minutes to load, with the interface continuously showing the loading spinner, significantly affecting usability.

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

Labels

Issue: needs updateAdditional information is require, waiting for responseReported on 2.4.8-p1Indicates original Magento version for the Issue report.

Type

No type

Projects

Status

Needs Update

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions