-
Notifications
You must be signed in to change notification settings - Fork 66
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
Performance improvement idea (to be discussed) #152
Comments
Hi, unfortunately it will be quite hard, if not impossible to implement due to selectedEmojis feature and related to that indications |
WDYM? What does the selectedEmojis indicate? Are the emojis growing wider when multi-selected or is there some sophisticated animation going on? |
I am currently using an iPhone 11 pro and the start-up for the emoji picker is quite slow the animation is really laggy. |
@jan-kozinski As it is described in the documentation, dev can pass an array of https://thewidlarzgroup.github.io/rn-emoji-keyboard/docs/documentation/Examples/selected_emojis |
@shanoysinc I am sorry to hear that. We are constantly working to improve performance. Does your issue also occur in the production build? |
yes in the production build but when I use the emoji picker in my own modal and not the bottom sheet modal the performance is great @jakex7 |
hmm @jakex7 |
I am sometimes seeing that the keyboard pops up but the emojis only appear after a delay - is this one of the 'performance issues' under consideration? |
Hi, we've been getting some performance issues reports lately, so I wanted to discuss a possible improvement regarding how we render the emojis.
Current solution
As of now, each category of emojis is built with a Flatlist component where each item is a single emoji.
Suggested solution
the renderItem callback of the flatlist could render whole rows of emojis at once, thus having less items to render, and less elements in the React DOM (since entire row will be kept in a single Text element). Then, the onClick callback of each row might check the X position of the touch gesture and determine which emoji the user tapped based on this X position value.
Possible problems
@mateki0 @jakex7 WDYT? (others are also more than welcome to enter the discussion :))
The text was updated successfully, but these errors were encountered: