Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: jerotas on July 29, 2013, 07:35:21 PM

Title: Performance bottleneck screen shot / all NGUI it seems
Post by: jerotas on July 29, 2013, 07:35:21 PM
Hi,

I have a UIPanel with 30 rows of 20 sprites it in. Yup 600 sprites. The UIPanel is marked as static and I do require the "depth pass" to get things showing up right. Now on the iPhone 4, I am getting about 33ms per frame taken up by UIPanel and UIWidget scripts. Not sure why as the sprites never move (static) and neither does the panel. Screen shots attached. I am considering giving ex2D a shot at this and seeing if it's faster. We wanted to use NGUI, as ex2D is at this point unsupported and a little buggy, but believe it may be a lot faster. But if anyone can help me get NGUI working a lot faster, we would appreciate it!

Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: ArenMook on July 30, 2013, 12:28:21 AM
What version of NGUI are you using? 2.6.3 all but removed UIPanel.LateUpdate from the profiler.
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: jerotas on July 30, 2013, 12:31:18 AM
Thanks Aren, I'm using 2.6.2. I'll try to upgrade then. What about the UIWidget performance though? I'm wondering why the sprite scripts are taking up that much time when they are static...and not moving anywhere or resizing.
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: ArenMook on July 30, 2013, 10:58:16 AM
Just upgrade. :P
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: jerotas on July 30, 2013, 11:03:57 AM
I tried upgrading and here's the new profiler. It's maaaaybe a tad faster but still the UIPanel and UIWidget are taking up 30-some odd ms per frame. The snap shot is a faster one, some were worse.
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: ArenMook on July 30, 2013, 11:15:27 AM
2.6.3 is more than a little faster, so that doesn't seem right. There is only one reason why it wouldn't be -- your version of Unity is not 4.1+?
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: jerotas on July 30, 2013, 11:18:09 AM
Correct. I'm on Unity 3.5.7. Are you saying that if I export with Unity 4.2 it will actually run faster on a mobile device?
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: ArenMook on July 30, 2013, 11:18:48 AM
Order of magnitude faster, yes.

I added the optimizations into the Unity Engine myself. :)
Title: Re: Performance bottleneck screen shot / all NGUI it seems
Post by: jerotas on July 30, 2013, 11:19:43 AM
Damn, I was wondering whether I should give that a try. I will. Thanks!