[wp-trac] [WordPress Trac] #35293: Emoji Regex in wp_encode_emoji() is wildly inaccurate
WordPress Trac
noreply at wordpress.org
Thu Aug 3 04:05:11 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
[https://wordpress.org/about/stats/ Over 90% of sites] use a version of
MySQL that supports utf8mb4, which means that they'll be storing emoji as
characters in their database, rather than HTML encoded entities. As such,
it seems wasteful to HTML encoded emoji before replacing them, when we can
probably skip the entire encoding process and replace the actual
characters with their corresponding `<img>` tag.
'''Data''': https://travis-ci.org/pento/test-41501/builds/260458177
'''Analysis''':
- At best, this is slightly faster for a few cases. In all other cases,
it's much slower. This is primarily caused by the optimisations added
earlier to short circuit expensive parts of the code no longer working.
'''Conclusion''': This path is worth exploring a bit further, to see if
the short circuits can be re-added, but may end up being a dead end.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35293#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list