I have the same question; could you please verify this, @Sula_Yang
? After this thread, I understood that boolean takes up less space. However, in the case of this list, I can’t imagine every left and right item to be boolean because it would get messy.
Another option, which is also less elegant, is to use instance swap for less-used items. Now, I wonder what actually takes up more space. This component is also used by non-designers, so it should be clear for them what to use.
@Corey_O_Brien what is interesting for me here, is whether Figma loads instances with hidden fields only when the page with them are opened.
Meaning if we have a library of components with boolean properties and we use the components in our designs on some page - those instances will be loaded only on the page where we are currently working.
Whereas the variants are being loaded in global memory of Figma, because of we need to have them at hand at all times via assets page.
So the solution here is to split designs into more pages so that their instances get lazy loaded.
But it is only assumption from me, I’m not sure how Figma handles the memory and currently I’m also facing the issues, Figma got really slow because of lots of nesting in my components… I’ve decided to rebuild design system with reduction of nesting and with migration from variants to boolean properties. I will let everyone know when I’m done, how it goes.
Also @Sula_Yang can you confirm whether my assumptions are correct or not?
The way I see it is that it is actually tricky how Figma uses memory. If you don’t visit a page, it doesn’t seem to take up memory much. Once you do, it draws the components on the page and then that page takes up more memory than it did originally.
I don’t know if you are correct that a component with variants takes up more memory because it is loaded into memory globally. I haven’t tested that out. Not sure why a variant would take up more than a boolean would in that regard.
What I do know is that the more layers that are present on the left-nav, the larger the memory usage is and because variants don’t show up as multiple layers and only bring in the layers in the variant you select, it takes up less memory. Even if the base component was loaded with all of the extra duplicate layers from the variants, it would still be more memory efficient than having each instance where you use that component containing the extra layers IMO.
Just found this thread because we’re struggling a lot with Figma performance lately.
When setting up components over the last year, I strictly went for the Base component approach for easier maintainability and now this seems to boomerang performance-wise. Yes, we do have tons of hidden layers. This is so annoying and I hope Figma can do sth about how it handles memory.
I use a fast internet connection, Desktop app and a powerful M2 MacBook Pro.