Skip to main content

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. 

 

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! 


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


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!