[wp-trac] [WordPress Trac] #45930: Improve the performance of emoji iteration in `wp_encode_emoji()` and `wp_staticize_emoji()`
WordPress Trac
noreply at wordpress.org
Thu Jan 10 23:19:41 UTC 2019
#45930: Improve the performance of emoji iteration in `wp_encode_emoji()` and
`wp_staticize_emoji()`
------------------------------+--------------------------
Reporter: johnbillion | Owner: pento
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.1
Component: Emoji | Version: 4.9
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses: performance
------------------------------+--------------------------
Changes (by pento):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"44554" 44554]:
{{{
#!CommitTicketReference repository="" revision="44554"
Emoji: Improve performance when encoding or staticizing emoji.
Both `wp_encode_emoji()` and `wp_staticize_emoji()` perform a PHP version
check when deciding how to apply their behaviour, but this check only
needs to happen once, rather than every time in their internal looks.
Moving the check outside of the loop reduces processing time by 50%.
Props johnbillion.
Fixes #45930.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45930#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list