Skip to content
This repository has been archived by the owner on Sep 10, 2023. It is now read-only.

Emoji is taking 5-6 seconds to render on medium to low-budget mobile devices #77

Open
sidAtHoumm opened this issue Feb 22, 2021 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@sidAtHoumm
Copy link

Hi,

We have an application using Ionic 4 with Capacitor 2. We have a chat application that utlizes the ngs-emoji-picket (version 0.1.6) & twemoji version 13.0.1. When the user clicks on the emoji button to show the entire set, it is taking over 5 seconds for the emoji set to show.

In the appModule.ts, we have imported the Module: NgxEmojiPickerModule.forRoot() and in child module called CommunicationModule.ts, we are importing the NgxEmojiPickerModule.

Issue is that the emoji's are taking over 5 seconds to load.

any help here would be welcome

@ahkohd
Copy link
Owner

ahkohd commented Feb 22, 2021

This is due to multiple re-renders, and lots of emojis element nodes that are loaded into the DOM. This is will be an intensive operation for some medium to low-budget mobile devices

Sadly, this plugin at its best for desktop devices

@ahkohd
Copy link
Owner

ahkohd commented Feb 22, 2021

The proper way to solve this issue is to lazy load the emojis using intersection observer at the plugin level

A hacky method is to programmatically open and make the emoji picker invisible before the user actually clicks the button to make the picker visible. Also, the close button hides the picker instead of removing it from the DOM

This project is in maintenance mode, I do not plan on releasing a new feature. However, PRs are welcome if anybody wants to implement this feature

@ahkohd
Copy link
Owner

ahkohd commented Feb 22, 2021

Alternatively, you can try out https://ahkohd.github.io/ngx-emoj/ its a bit optimized

@ahkohd ahkohd added help wanted Extra attention is needed enhancement New feature or request labels Feb 22, 2021
@ahkohd ahkohd changed the title Emoji is taking 5-6 seconds to render Emoji is taking 5-6 seconds to render on mobile devices Feb 22, 2021
@ahkohd ahkohd changed the title Emoji is taking 5-6 seconds to render on mobile devices Emoji is taking 5-6 seconds to render on medium to low-budget mobile devices Feb 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants