haowang1013
Topic Author
Posts: 10
Joined: 15 Sep 2014, 03:16

performance stats in unity

15 Sep 2014, 03:36

Hi,

I'm wondering what's the best way to check performance related stats in unity when I use Noesis.

I mainly care about iOS and Android platforms.

Thanks
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: performance stats in unity

15 Sep 2014, 20:08

Hi,

For CPU usage you can use the Unity profiler. Our functions (the c# layer) appear there. For GPU it is a little more complex because as we are a native plugin Unity stats about draw calls, # of triangles... won't get affected. You have to activate/deactivate GUI panels and see how the GPU rendering time gets affected. You can also play with the Debug Flags options in the NoesisGUI Panel.

We have an internal remote tool for debugging stats that will be released in the future. We still don't know when yet.

You can also use the XamPlayer stats to get a general idea of the performance as commented in the Optimizing NoesisGUI Performance guide
 
haowang1013
Topic Author
Posts: 10
Joined: 15 Sep 2014, 03:16

Re: performance stats in unity

16 Sep 2014, 03:53

Thanks, is xamlplayer part of the unity package from the asset store? I'm asking since I can't find it.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: performance stats in unity

16 Sep 2014, 16:32

No, it is part of the SDK that you can download as soon as your account is verified.
 
User avatar
ai_enabled
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: performance stats in unity

30 Oct 2014, 10:47

Hi! Really miss this feature now... Any idea why the NoesisGUI takes so much time to render in Unity?

Editor stats (VSync off):
GUI camera enabled: 6 ms
GUI camera disabled: 0.5 ms

Game stats (release build):
GUI camera enabled: 160 FPS
GUI camera disabled: 320 FPS

Also ControlGallery demo, "Control palette" sample:
Editor stats (VSync off):
GUI camera enabled: 14 ms
GUI camera disabled: 0 ms

"Styles" sample (and most other "light" samples):
Editor stats (VSync off):
GUI camera enabled: 3 ms
GUI camera disabled: 0 ms

Tested in Unity 4.5.5f1 with NoesisGUI v1.1.12.
Hardware:
CPU Intel Core i7-4750 4.3 GHz quad core
GPU AMD Radeon R9 270X


UPDATE
NoesisGUI v1.2 seems to not have this issue, nearly zero ms on renderer in UnityEditor Control Gallery sample!
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: performance stats in unity

30 Oct 2014, 23:01

Hi! Really miss this feature now... Any idea why the NoesisGUI takes so much time to render in Unity?
This question cannot be answered in general. There are many factors that influence the time taken to render each frame. I would start reading the Performance document and after that I would examine the concrete scene that is giving you trouble. We can help with that here.
Editor stats (VSync off):
GUI camera enabled: 6 ms
GUI camera disabled: 0.5 ms
These timings are GPU one? If they are CPU, remember that NoesisGUI is slower inside the editor than in standalone. There are many checks in the editor to avoid crashing Unity.
Game stats (release build):
GUI camera enabled: 160 FPS
GUI camera disabled: 320 FPS
Converting this to ms (remember to always measure performance in ms not in fps) I get:

GUI camera enabled: 6.25 ms
GUI camera disabled: 3.125 ms

So, in this case, NoesisGUI is taking 3 ms to render. I don't know what part of your game you are testing here but if it corresponds to one of the complex gui (the inventory for example) I would say this is a good number.
Also ControlGallery demo, "Control palette" sample:
Editor stats (VSync off):
GUI camera enabled: 14 ms
GUI camera disabled: 0 ms
Yes, the control palette is very inefficient in the v1.1 version. We did many changes in v1.2 to improve it.
NoesisGUI v1.2 seems to not have this issue, nearly zero ms on renderer in UnityEditor Control Gallery sample!
Many things changed in the v1.2 version. We have a new rendering algorithm that also improves the number of batches, ramps are handled more efficiently and our default themes have been redesigned to avoid abusing opacity groups.
 
User avatar
ai_enabled
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: performance stats in unity

31 Oct 2014, 01:55

This question cannot be answered in general. There are many factors that influence the time taken to render each frame. I would start reading the Performance document and after that I would examine the concrete scene that is giving you trouble. We can help with that here.
Thanks for response!
I'm sure our XAML code is already over-optimized - all reusable brushes/styles are extracted to resource dictionaries, opacity groups avoided and replaced with the in-brush alpha, and "forever" animations is avoided also.
Editor stats (VSync off):
GUI camera enabled: 6 ms
GUI camera disabled: 0.5 ms
These timings are GPU one? If they are CPU, remember that NoesisGUI is slower inside the editor than in standalone. There are many checks in the editor to avoid crashing Unity.
That's the render stats, so it GPU-only. CPU also used for 1-2 ms by NoesisGUI, and yes, it reduced 2-3 times in the release build.
In the Unity Profiler with GUI camera enabled a FX.WaitForPresent() call appears, which usually means that CPU have to wait for GPU...
Game stats (release build):
GUI camera enabled: 160 FPS
GUI camera disabled: 320 FPS
Converting this to ms (remember to always measure performance in ms not in fps) I get:
GUI camera enabled: 6.25 ms
GUI camera disabled: 3.125 ms
So, in this case, NoesisGUI is taking 3 ms to render. I don't know what part of your game you are testing here but if it corresponds to one of the complex gui (the inventory for example) I would say this is a good number.
These measurements are complex, so I couldn't say exactly how much time NoesisGUI takes on the GPU side. They are measured on HUD rendering, but we preload other controls (game windows) and hide them using Visiblity=Hidden, so I thought they should not render, is that right? I will test it further, on Main Menu and some simplier controls...
Many things changed in the v1.2 version. We have a new rendering algorithm that also improves the number of batches, ramps are handled more efficiently and our default themes have been redesigned to avoid abusing opacity groups.
I see... and if changes so dramatical - great work! But are you sure the performance issue is not a bug? Maybe some kind of mistiming between Unity rendering thread and NoesisGUI renderer?..
AtomicTorch Studio Pte. Ltd. http://atomictorch.com
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: performance stats in unity

31 Oct 2014, 02:09

I see... and if changes so dramatical - great work! But are you sure the performance issue is not a bug? Maybe some kind of mistiming between Unity rendering thread and NoesisGUI renderer?..
What do you mean with the "performance issue" ? Not sure to understand here where there could be a bug. Measurements are being done by Unity timing its render thread and we just send GPU commands in that thread.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: performance stats in unity

31 Oct 2014, 02:16

These measurements are complex, so I couldn't say exactly how much time NoesisGUI takes on the GPU side. They are measured on HUD rendering, but we preload other controls (game windows) and hide them using Visiblity=Hidden, so I thought they should not render, is that right? I will test it further, on Main Menu and some simplier controls...
Yes, that is right. Hidden controls do not generate render commands.
 
User avatar
ai_enabled
Posts: 221
Joined: 18 Jul 2013, 05:28
Contact:

Re: performance stats in unity

31 Oct 2014, 05:13

jsantos, I tested other controls and yes, you're right, is not a bug. It's just high GPU usage by NoesisGUI v1.1 renderer... more controls rendered, higher usage - unexpected and little bit disappointing for us (trying to optimize the game for Steam release): we loosing half of performance on the GUI rendering even on HUD. But I understand v1.2 will improve greatly and we need to consider upgrading on it when it will be stable enough. Also would like to have performance stats API for Unity3D in it...
AtomicTorch Studio Pte. Ltd. http://atomictorch.com

Who is online

Users browsing this forum: Google [Bot] and 0 guests