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?

@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.

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)

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): They can give you some specific advice on how to handle the memory load more efficiently.