Skip to main content
Question

js-to-wasm running very slow

  • February 11, 2025
  • 3 replies
  • 72 views

Malthe Gram

Im working on a plugin which sends data back and forth using postMessage’s between UI components and the Figma API. Im essentially sending entire frames and their design elements. 
I’ve seen when I choose a design with many elements, that it’s running very slow and freezing up the UI until the work is done.

How can I optimize this? Any and all inputs are greatly appreciated. 

 

3 replies

Luke Calderon
  • New Member
  • 1 reply
  • June 10, 2025

We are also seeing similar behaviour in large files. Example of adding icons to larger libraries, the UI can freeze for 5-10 seconds, which is quite frustrating! 


Malthe Gram
  • Author
  • New Member
  • 3 replies
  • June 11, 2025

I figured out why it happened for me.
It was when dealing with very large images..


Celine_
Figmate
  • Community Support
  • 4058 replies
  • June 12, 2025

Hi everyone,

Thanks for raising this. Based on what you've described, it sounds like the slow response is likely due to the size of the request being handled by the plugin, larger files or images. The root issue seems to be the amount of data being sent at once.

As a workaround, you might try reducing the payload size or batching the data into smaller chunks rather than sending everything at once. This can help reduce UI freezing and improve performance.

I'll leave this open to the community — others here may have faced similar challenges and can share helpful tips. You might also find it useful to ask in our Discord, where more developers are active. Hope this helps!