wittyeggnog
Topic Author
Posts: 4
Joined: 15 Sep 2019, 18:53

QuestLog Example Creating Approximately 5KB of Garbage Each Frame

15 Sep 2019, 19:02

I am new to NoesisGUI and wanted to test to see if the framework was going to generate garbage each frame before integrating it into my project. I opened the QuestLog scene and started the profiler. Here's an image showing the results. https://www.dropbox.com/s/l93pjh19kqcul ... c.jpg?dl=0

Each frame NoesisGUI seems to be producing approximately 5KB of Garbage. Not long after (not captured in linked image) I saw a large garbage collector spike taking 9.5 milliseconds. This amount of time really eats into my game's performance, and is likely only this quick because I'm running on a very powerful machine. I've see GC's take much longer.

I'm very concerned about garbage generation; I don't want my game having unnecessary long pauses. This would look bad during normal gameplay as well as animating the UI might pause mid-animation to wait for garbage collection. This UI's data was static; I'm even more concerned about UI's that have dynamically changing data. This would include lists that are having their items added, removed, moved and sorted. Each of these items could have buttons which need events; and therefore have to use the "+=" event hookup method which, if I remember correctly, generates garbage.

Are there solutions to these problems?
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

16 Sep 2019, 14:19

Those garbage collections you mention seem to be coming from the InputSystem of Unity. We fixed that, long time ago, by exposing a check box for disabling input from the gamepad (in case you are not using gamepads). It is disabled by the default. What version of Noesis are you using? Could you verify the settings you have in the View?
 
wittyeggnog
Topic Author
Posts: 4
Joined: 15 Sep 2019, 18:53

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

16 Sep 2019, 16:29

I downloaded it from the Asset Store yesterday; the version is v2.1.0f1.

In the Scene on the MainCamera the NoesisView settings are:
RenderMode: Camera Overlay
Enable PPAA: False
Tessellation Quality: Medium
Render Flags: Normal
Enable Keyboard: True
Enable Mouse: True
Enable Touch: True
Emulate Touch: False
Real Time Clock: False

Let me know if there's any other settings I can show you. This product looks awesome, so if I can get past this I'll be using it a lot.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

16 Sep 2019, 16:56

I downloaded it from the Asset Store yesterday; the version is v2.1.0f1.
The Asset Store version is old, please always download the latest version at our site.

https://www.noesisengine.com/developers/downloads.php
 
wittyeggnog
Topic Author
Posts: 4
Joined: 15 Sep 2019, 18:53

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

17 Sep 2019, 03:24

Alright, so now that I've got the latest version (sorry for that; I should have checked that myself!), I no longer see any garbage generated on a per-frame basis while performing no actions. However, I am still seeing a considerable amount of garbage generated when interacting with the UI. https://www.dropbox.com/s/xmgj3k6r9d6o5 ... 2.jpg?dl=0

Is there some way of getting around this garbage generation?
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

17 Sep 2019, 15:06

Is there some way of getting around this garbage generation?
No client reported performance issues about this so far, but if you find a piece of code that should be free of garbage generation, please report about it and provide suggested solution. All C# source code is included. Please, do not report about "generic GC optimization" in the tracker.
 
wittyeggnog
Topic Author
Posts: 4
Joined: 15 Sep 2019, 18:53

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

17 Sep 2019, 16:20

No client reported performance issues about this so far.
I'm showing you. The steps are trivial. And the absolute fact is that in Unity3D if you generate garbage long enough you'll eventually trigger GC.
If you find a piece of code that should be free of garbage generation, please report about it and provide suggested solution. All C# source code is included.
I'm happy to report bugs; I took time to work with you on this one. I won't be providing you, the engineer, with the solution. That's your job, not mine. I'm not going to go through your code to fix the problems you created.
Please, do not report about "generic GC optimization" in the tracker.
Don't worry; I won't be reporting any new issues. Our company won't be using this product.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

17 Sep 2019, 16:31

No client reported performance issues about this so far.
I'm showing you. The steps are trivial. And the absolute fact is that in Unity3D if you generate garbage long enough you'll eventually trigger GC.
You are not showing any performance issue. You are just showing a bunch of GCs, many of them being generated by Unity.
If you find a piece of code that should be free of garbage generation, please report about it and provide suggested solution. All C# source code is included.
I'm happy to report bugs; I took time to work with you on this one. I won't be providing you, the engineer, with the solution. That's your job, not mine. I'm not going to go through your code to fix the problems you created.
As said, what you mention is not a bug, you are indicating a potential improvement and just reporting in the tracker "Please, fix all GC allocations in Noesis" is going nowhere. We need to understand your specific scenario and get your feedback. Look at how the rest of clients are contributing.
Please, do not report about "generic GC optimization" in the tracker.
Don't worry; I won't be reporting any new issues. Our company won't be using this product.
You are not a company, you are an individual developer that paid 0€ for this product. The less you can do is being more open to help us with your feedback and suggestions.
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: QuestLog Example Creating Approximately 5KB of Garbage Each Frame

19 Sep 2019, 16:08

Hi @wittyeggnog,

For next version we fixed some GC allocs generated during iteration of our collections due to an incorrect implementation of enumerators.

But there are other allocs that are inherent to WPF architecture, for example the creation of event args when events are raised, or the boxing of values when accessing dependency properties,...

Those are things we don't have plans to optimize unless they prove to be a problem in real environments.

Who is online

Users browsing this forum: Ahrefs [Bot] and 78 guests