-
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
Replacing simple preg calls with less expensive alternates #341
Conversation
Hello parhamr, |
preg_split -> explode change seems to be reasonable, but combinations of substr/strpos/strlen mess up the code. Did you measure the gain within real application? Referring to this comment: any code change without evidence of performance improvement is premature optimization. |
I’m not sure what you mean by mess up the code; those function names describe exactly their intent and purpose. No, I did not measure any changes. This is a matter of PHP best practices and code style and it’s up to your organization to determine what standards and quality are acceptable for your core product. |
@orlangur Please check official PHP documentation about preg_match. There is a good note from PHP core team:
|
* Fixed bugs: * Fixed placing order with PayPal Payments Advanced and Payflow Link * Fixed losing previously assigned categories after saving the product with changed category selector field * Fixed losing of a newly created category assignment after variations generation during Configurable product or Gift Card creation * Fixed the error in order placement with Recurring profile payment * GitHub requests: * [#299](#299) -- Fix for issue Refactor Mage_Rating_Model_Resource_Rating_Collection * [#341](#341) -- Replacing simple preg calls with less expensive alternates * Modularity improvements: * Layout page type config moved to library * Design loader moved to library * Theme label moved to library * Themes update: * Reduced amount of templates and layouts in magento_plushe theme * Responsive design improvements * Integrity improvements: * Covered all Magento classes with argument sequence validator * Added arguments type duplication validator * Implemented API Integration UX flows: * Ability to create and edit API Integrations * Ability to delete API integrations that were not created using configuration files * Removed System REST menu item and all associated UX flows: * Users, Roles, and Webhook Subscriptions sub-menu items were removed * Removed the Webhook module
parhamr, Thank you for your contribution! Looking forward for your new contributions. |
[API] Sprint 49 – Test Coverage and Bugs
- Merge Pull Request magento/graphql-ce#341 from kisroman/graphql-ce:graphQl-255 - Merged commits: 1. 1bbeb21
- Merge Pull Request magento/graphql-ce#341 from kisroman/graphql-ce:graphQl-255 - Merged commits: 1. 1bbeb21
AC-1453: Fix Static/Unit test
Changes
preg_match
calls with equivalentsubstr
,strpos
, and/orstrlen
checkspreg_split
calls with equivalentexplode
operationsTesting