-
Notifications
You must be signed in to change notification settings - Fork 9.4k
refreshAcl in Authentication plugin slows down all adminhtml requests #39843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @ilnytskyi. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Can this be safely removed? |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @ilnytskyi, Thanks for the report and collaboration! We have tried to reproduce this issue in the latest 2.4-develop branch and php-spz profiler. We have profiled product listing page, which shows Please let us know if we have missed anthing. Thanks |
Please profile adminhtml area, e.g. main dashboard page. |
Preconditions and environment
Magento\Backend\App\Action\Plugin\Authentication
enabledMagento\Authorization\Model\Acl\Loader\Rule::getRulesArray
Steps to reproduce
Magento\Backend\App\Action\Plugin\Authentication::aroundDispatch
calls the$this->_auth->getAuthStorage()->refreshAcl();
line https://github.com/magento/magento2/blame/2.4-develop/app/code/Magento/Backend/App/Action/Plugin/Authentication.php#L144Magento\Authorization\Model\Acl\Loader\Rule::applyPermissionsAccordingToRules
that adds about 200ms to total response time.Expected result
Authentication::aroundDispatch
does not slow down admin requestsActual result
Authentication::aroundDispatch
slows down admin requestsAdditional information
Unfortunately it's unclear why this plugin is needed or why it triggers refreshAcl via

$this->_auth->getAuthStorage()->refreshAcl();
The code added many years ago probably just as migration from Magento 1.
Release note
Fixed 200ms performance degradation in adminhtml area caused by Magento\Backend\App\Action\Plugin\Authentication::aroundDispatch plugin.
Triage and priority
The text was updated successfully, but these errors were encountered: