Sometimes, it's convenient to add a very large number of rows to a table (1000+) but only show a small set of them, by keeping most of them set to visible = false. However, based on some testing (but without actually being able to see the code), it seems that adding elements to or removing elements from the table always causes layout to be recalculated, even if those elements have visible = false set.
If the table is hidden entirely, be it because it has visible = false set or is in an inactive tab, then adding or removing elements (visible or not) is very fast, so the game is clearly doing some kind of check to skip doing expensive re-layout. I believe that it should also check if the element being added or removed is hidden, and if so, also skip doing any kind of layout updates. This would make maintaining very large tables much simpler.
Basic optimisation when adding or removing elements with visible=false to a gui table
Re: Basic optimisation when adding or removing elements with visible=false to a gui table
Can you provide an example mod that shows the performance issues you're talking about? Without profiling, it's mostly guess-work about what might or might not be slow and what might help.
If you want to get ahold of me I'm almost always on Discord.
Re: Basic optimisation when adding or removing elements with visible=false to a gui table
I've opted to instead just destroy and create rows as needed for my mod, so I don't have a real example to show anymore. Feel free to close this if it is unlikely to be looked into without a good example 
