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

Allow lazy loading of emoji picker #2539

Closed
max-nextcloud opened this issue Mar 8, 2022 · 2 comments
Closed

Allow lazy loading of emoji picker #2539

max-nextcloud opened this issue Mar 8, 2022 · 2 comments

Comments

@max-nextcloud
Copy link
Contributor

When profiling the text app we noticed that the menubar and in particular the emoji picker took a long time to render.
Loading the menubar after the initial text was rendered saved ~800 ms on the text render.

However it's not ideal to postpone rendering the entire menu bar. I suspect that loading the picker is what makes the emoji picker component take a long time to load. So if we could lazy load the picker that might allow us to render the menubar together with the text without waiting for the picker to complete rendering.

I imagine something like this:

<EmojiPicker 
  ...
  :loadPicker="mainContentLoaded" >
  <button>
</EmojiPicker>

When mainContentLoaded becomes true the picker would be loaded.

@max-nextcloud
Copy link
Contributor Author

max-nextcloud commented Mar 8, 2022

I tried to figure out if this was text specific and disabled the EmojiPicker in talk. In my dev instance an empty talk room will render approx. 1 sec. faster without the emoji picker.
Of course it would be ideal to just have the picker load fast - but for now i think lazy loading seems more doable.

update: I did some more profiling and i am not sure about that 1 second claim anymore. Load times vary a lot and it's really hard to have a good measurement.

@Antreesy
Copy link
Contributor

Solved with #4479 (delayed first init, shared data afterwards)

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

2 participants