[wp-trac] [WordPress Trac] #32125: Emoji script: multiple second execution time when using AngularJS to insert text

WordPress Trac noreply at wordpress.org
Fri Apr 24 19:50:33 UTC 2015


#32125: Emoji script: multiple second execution time when using AngularJS to insert
text
--------------------------+------------------
 Reporter:  brad989       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.3
Component:  General       |     Version:  4.2
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------
Changes (by azaozz):

 * milestone:  Awaiting Review => 4.3


Comment:

 Seems there are two ways this can be optimized:
 1. Get the new or modified nodes `textContent` and do `twemoji.test()`
 before running `parse()`. That is still a big regex but will be much
 faster in case there are mo emoji chars.
 2. Implement something like Underscore's `_.throttle()` that will execute
 as soon as called but delay the next execution by 100ms -- 200ms.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32125#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list