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

Optimize plugin window by droping React, adopting Svelte or Preact #152

Open
1 of 3 tasks
softmarshmallow opened this issue Aug 27, 2021 · 1 comment
Open
1 of 3 tasks

Comments

@softmarshmallow
Copy link
Member

softmarshmallow commented Aug 27, 2021

Currently the production mode of the figma plugin is hosted on plugin window and the hosted plugin ui (Both React)
But since the bootup time is critical, we can optimize this via using minimized version of framework (or even vanilla) just for hosting a plugin ui on plugin window.

I'm not sure how much booting time can be saved, but worth a try ;)

References

Resolutions

  • change plugin host to vanilla html + js + css
  • change PluginApp not to wait until PluginService to bootup (show ui first, don't throw when initialized without timeout)
  • Optimize web for faster loading speed across network

Current

grida-figma-booting-performance-snapshot.mov
@softmarshmallow
Copy link
Member Author

softmarshmallow commented Aug 28, 2021

This is what happens when using vanilla js + html for the plugin host window.

frame-host-with-vanilla.mov

After plugin window shows up.

  • First html content 40ms
  • First iframe content 300ms
  • Plugin message transport to be completed after callback 1560ms
  • Remote plugin ui to show up 2100ms

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

1 participant