Closed padinko closed 5 years ago
@padinko sorry to hear that you're experiencing such a long processing time. Can you provide a few details about your integration so that we can attempt to recreate and resolve this?
As for unicodeToImage
, the idea was to unify the replacement by mapping everything through toImage
, thereby converting replacements to shortname, then to image. This was causing minimal additional processing time in testing.
Do you have a situation where you wish to replace unicode characters but not shortnames within the same string?
I did some demos (check console for times):
v3.1.7
- https://jsfiddle.net/76qcth83/ ~0.07s
v4.0.0
- https://jsfiddle.net/mzhqyagv/ ~9s
v4.5.0
- https://jsfiddle.net/6dba573x/ ~9s
Our project needs only emojis from emoji keyboard are shown as emojione. So when someone input :smiley:
it will not be replaced (I know it's very unlikely, but emojione 3 have this feature)
@padinko thanks for creating these examples. We'll make sure to optimize these for the next release.
This is improved upon in the 5.0 release https://github.com/joypixels/emoji-toolkit/releases/tag/5.0.0.
We have page with many user inputs We only want to transform unicode characters. no shortcodes
With 544 inputs and use
unicodeToImage
in 3.1.7, it takes ~1.47s With 544 inputs and usetoImage
in 3.1.7, it takes ~1.55sAfter we upgrade to 4.0.0.. times are not usable With 544 inputs: method
unicodeToImage
do nothing.. Why you remove this? We only want transform this With 544 input and usetoImage
in 4.0.0, it takes ~20.8sI need to stay on 3 because of performance and
unicodeToImage