Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: andrejvojtas on September 03, 2013, 02:46:16 AM
-
Hi,
I have read trough quite a few performance related posts here, but came up empty.
My setup: I have a 1 drawcall UI, as I use 1 panel and 1 atlas for everything. On Start() I generate lists of widgets representing the various part of the UI. Then as needed I manually enable and disable widgets via NGUITools.SetActive() to show and hide parts of the GUI. The panel reaches up to 100 widgets, enabling and disabling groups of about 20-50 at a time.
The question: would it perform better, if I added a UIPanel to each group? If I understand it correctly adding more panels adds drawcalls, but they would be probably batched, as they use 1 atlas right? The reason I ask is, I read the UIPanel buffer rebuilds everytime a widget is enabled / disabled and the more widgets it has, the slower the rebuild. What is more expensive: adding 2-3 drawcalls or rebuilding 2-3 times a panel with ~ 100 widgets?
Thank you for your time.
-
I was very curious about it and had the same question when started my GUI. But later I thought, if I can't see in my profile test, It don't bother me :P
-
Disabling a panel won't be faster. When you disable a panel, it releases the draw call. When you re-enable it, it has to re-create it. It's better to stick to one panel, many widgets in this case.
-
Thank you for your answers, I really appreciate it :)