[wp-trac] [WordPress Trac] #35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
WordPress Trac
noreply at wordpress.org
Thu Aug 3 07:51:57 UTC 2017
#35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
--------------------------+-----------------------
Reporter: pento | Owner: pento
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.9
Component: Emoji | Version: 4.2
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+-----------------------
Comment (by pento):
== Test 7.2
Looping over the entire emoji array for every block in staticize is pretty
wasteful. Instead, looping over it at the start to create a smaller array
of emoji that we'll probably be replacing means we reduce the size of the
inner loop significantly.
'''Data''': https://travis-ci.org/pento/test-41501/builds/260498759
'''Analysis''':
- We're now about the same or significantly faster on all tests, when
compared to 6.1.
- When compared to the old behaviour, 7.2 is about the same, or a bit
slower for primary use cases.
'''Conclusion''': Despite now being the fastest, the optimisation applied
here could be applied to 6.1, too. That'll need more testing to compare.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35293#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list