-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Optimize performance by using isset() instead of in_array() #24677
Optimize performance by using isset() instead of in_array() #24677
Conversation
Hi @andrey-legayev. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
I need a help with following code issue:
@ihor-sviziev do you have an idea which exception should be thrown instead of \Exception ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @andrey-legayev,
I think \Exception there could be replaced to \LogicException
Hi @ihor-sviziev, thank you for the review.
|
I've run XDebug profiler to see why static content deploy takes so much time. Many in_array() calls grabbed my attention and I've fixed it. Co-Authored-By: Ihor Sviziev <ihor-sviziev@users.noreply.github.com>
Updates:
|
Hi @ihor-sviziev, thank you for the review. |
✔️ QA passed |
Hi @andrey-legayev, thank you for your contribution! |
Description (*)
I've run XDebug profiler to see why static content deploy takes so much time.
Many calls of in_array() grabbed my attention and I've fixed two such places:
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
General regression testing.
Questions or comments
N/A
Contribution checklist (*)