Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poor performance on Android #50

Open
stevebrowndotco opened this issue Aug 22, 2022 · 4 comments
Open

Poor performance on Android #50

stevebrowndotco opened this issue Aug 22, 2022 · 4 comments

Comments

@stevebrowndotco
Copy link

Hello,I have a hybrid app built in Ionic. I noticed that when parsing emojis, the performance locks up the device, rendering it unusable for a period of 3 - 4 seconds. I am using in conjunction with ngx-markdown but I isolated the issue to this library.

Thank you!

@zarko-tg
Copy link

It's most likely this issue, still unresolved
#1 (comment)

@netzzeit
Copy link

netzzeit commented Jan 7, 2023

Hey,

I'm facing the same issue in my capacitor project. It's working like a charm on iOS, but blocks the UI for a couple of seconds on Android (v11, v12, v13). I tried to put the first call into a setTimeout to handle the process asynchronously, but the blocking persists anyway.

Since there is no solution at the moment - did anyone find an alternative library to achieve the emoji-shortcode replacement? I'm using the shortcodeToUnicode function only.

Thanks a lot!

@brenc
Copy link

brenc commented May 15, 2024

This has been happening for us for a while on desktop browsers (probably mobile too but most people use the built-in picker there). The first call to toImage takes several seconds to run but subsequent calls are fast.

@brenc
Copy link

brenc commented May 15, 2024

This seems to be most pronounced with Chromium based browsers. Tested on Mac and Windows 11. Chrome, Arc, Brave, and Edge all take 3-4s on the initial call to toImage or shortnameToImage (anything that calls the line below). This might be why it's so pronounced on Android.

FF and Safari lag as well but it's < 1s. I've narrowed it down to this line in lib/js/joypixels.js (I'd link to the exact line but it crashes my browser):

str = str.replace(ns.regShortNames, function(shortname) {

I think something changed in Chromium in the past year or so as I have never had a problem before then. Still looking for a workaround for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants