-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions and environment
Follow up for #38043 as the proposed solution is declined and the related issue got closed after 3 years.
Issue
The customer group caches data to make sure that not too re-use the data, because this is a plugin this will fire many queries to the database fetching the same data.
Description (*)
\Magento\Customer\Api\GroupRepositoryInterface::getById has a plugin \Magento\Customer\Model\Plugin\GetByIdCustomerGroupExcludedWebsite::afterGetById which will add the excluded groups to the customer groups as extension attributes. Every customer group getById() will do a extra database request. This will re-use the existing data without querying the database again, the data itself is pretty small, which will serve from memory in the next requests.
Related Pull Requests
Fixed Issues (if relevant)
Ran into it working on a project.
Manual testing scenarios (*)
I came along 400 something queries in the frontend on a grouped project page, this adds a 500ms on pageload.
Questions or comments
The customer group uses the same principal in the repository to cache the data.
Related MR
Steps to reproduce
Navigate to a category page.
Expected result
Have it load 500ms faster
Actual result
It is 500ms slower
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
Type
Projects
Status