[wp-trac] [WordPress Trac] #58220: Replace usage of substr with str_starts_with and str_ends_with
WordPress Trac
noreply at wordpress.org
Wed Jun 21 17:19:49 UTC 2023
#58220: Replace usage of substr with str_starts_with and str_ends_with
------------------------------+-----------------------------
Reporter: Soean | Owner: SergeyBiryukov
Type: enhancement | Status: assigned
Priority: normal | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: performance
------------------------------+-----------------------------
Comment (by spacedmonkey):
Performance testing:
Run on PHP 7.4 - 2020 theme and theme test data imported, trunk vs PR.
Runned 500 times
|| || Trunk || PR ||
|| Response Time (median)|| 85.6|| 84.93 ||
|| wp-before-template (median)|| 20.81|| 20.68 ||
|| wp-before-template-db-queries (median}|| 2.99|| 2.97 ||
|| wp-template (median)|| 55.52|| 55.22 ||
|| wp-total (median)|| 76.42|| 75.98 ||
|| wp-template-db-queries (median)|| 5.83|| 5.77 ||
Blackfire profiles show a similar story.
https://blackfire.io/profiles/compare/73d894ed-7057-44aa-840e-
eed31d7a5085/graph
This change is a net benefit. @azaozz
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58220#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list