-
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
Performance optimizations #25125
Performance optimizations #25125
Conversation
Hi @andrey-legayev. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Can someone help me to fix following findings of Static Tests?
|
@@ -50,8 +53,7 @@ public function render(array $source, array $arguments) | |||
{ | |||
$text = end($source); | |||
/* If phrase contains escaped quotes then use translation for phrase with non-escaped quote */ | |||
$text = str_replace('\"', '"', $text); | |||
$text = str_replace("\\'", "'", $text); | |||
$text = strtr($text, ['\"' => '"', "\\'" => "'"]); |
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.
I've tested: str_replace() is slower than strtr() in this case
I've tested: str_replace() is slower than strtr() in this case
Static tests have been fixed. |
Hi @ihor-sviziev, thank you for the review. |
I've run performance tests for string concat vs. array join: No real performance improvement (which surprised me). |
I've run performance tests for string concat vs. array join: https://gist.github.com/andrey-legayev/24ed101a34d4775bf1b6f9879581f51a No real performance improvement (which surprised me). But anyway - I'm rolling back string concatenation improvements, because it doesn't make any sense.
@engcom-Foxtrot please take a look at static tests and seems like some EE and B2B are failing as well |
Hi @andrey-legayev Please fix failed static test and Functional Test, as we have no access to your repository, thank you! |
…o 2.3-perf-optimization
Hi @ihor-sviziev, thank you for the review. |
Hi @andrey-legayev, thank you for your contribution! |
Description (*)
I've prepared several performance optimizations based on my XDebug profiling and debugging of add to cart process and shopping cart page.
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
General regression testing
Questions or comments
N/A
Contribution checklist (*)