Skip to main content
Ethan_Wang
Jan 12, 2024 6:41 PM UTC
Question

Does instance layer hidden by variable mode increase memory usage?

I have a layer in my main component that I’m hiding using variable mode. This component’s instance is used in many places. Given that the layer is hidden in all instances and only visible when I switch to the other mode, does it increase memory usage?

This topic has been closed for replies.

3 replies

ksn
Figmate
Community Support
Jan 12, 2024 11:08 PM UTC

@Ethan_Wang‌ I believe this will still increase memory usage – the layer is still present in all those instances, even if hidden, so they are still taking up memory in the background.

Ethan_Wang
Jan 13, 2024 12:37 AM UTC

Thanks for the reply. Memory usage wise, is it the same as using the boolean property to toggle visibility? (I see it is recommended as the memory saving solution for hidden layers, so was wondering if using variable mode is just as effective)

ksn
Figmate
Community Support
Jan 17, 2024 6:23 PM UTC

It depends on the design specifically, so it’s hard to say.

Typically, using boolean props + hidden layers = more or less layers than setting up each of those states. After consulting some other support team members on this, it sounds like boolean props help reduce layer count, but depending on the design, will not be the case.

Since this one is outside my current knowledge, I’d recommend asking the support team directly (and sharing a copy of the file you’re trying to reduce memory load on if you can): https://help.figma.com/hc/en-us/requests/new?ticket_form_id=360005944714. They can give you some specific advice on how to handle the memory load more efficiently.