View Issue Details

IDProjectCategoryView StatusLast Update
0001620NoesisGUIUnitypublic2020-05-08 12:32
Reporterstonstad Assigned Tojsantos  
PrioritynormalSeveritymajor 
Status resolvedResolutionfixed 
Product Version2.2.6 
Target Version3.0.0Fixed in Version3.0.0 
Summary0001620: GC Allocations #1
Description

In 2.2.6 I am seeing more per-frame allocations than 2.2.5. Specifically, the new dispatcher allocates. NoesisView.LateUpdate() is also allocating. I am investigating on my side to try to understand to what extent this is something I could be causing. Screenshot enclosed of allocations and corresponding stacktrace.

  • View.RaiseRendering() - ObjectEqualityComparer.
  • Extend.FrameworkElementMeasure()
  • Extend.FrameworkElementArrange()
Attached Files
GC Allocations 1.PNG (68,097 bytes)   
GC Allocations 1.PNG (68,097 bytes)   
No Alloc.PNG (4,130,831 bytes)
No Alloc-2.PNG (4,130,831 bytes)
Alloc wNoesis-2.PNG (3,976,413 bytes)
PlatformAny

Activities

stonstad

stonstad

2020-01-16 16:16

reporter   ~0006077

Last edited: 2020-01-16 17:43

Encl. GC Allocations #2. DispatcherOperation.Invoke(). As it is new, I do not directly use the Noesis dispatcher directly in my code.

GC Allocations 2.png (39,983 bytes)   
GC Allocations 2.png (39,983 bytes)   
stonstad

stonstad

2020-01-21 16:48

reporter   ~0006078

For testing, all UI is tied to one GameObject node to simplify enabling and disabling Noesis UI.

Encl. Alloc wNoesis.png. Screenshot of Stellar Conquest with Noesis enabled.
Encl. No Alloc.png Screenshot of Stellar Conquest with Noesis disabled.

Screenshots show significant allocation in Noesis, some of it new in 2.2.6. I definitely appreciate new features planned for 3.0, but I feel this is a barrier for commercial success in PC/console gaming.

Alloc wNoesis.PNG (3,976,413 bytes)
stonstad

stonstad

2020-04-09 17:35

reporter   ~0006183

Hello -- I am just reaching out to see if there has been any work done around these GC allocations? I haven't rerun my tests w/ Beta 6.

If anything has changed please let me know and I'll rerun. I'm holding off on upgrading Stellar Conquest to v3.x until GC allocations are addressed.

Thanks,
Shaun

sfernandez

sfernandez

2020-04-21 16:54

manager   ~0006232

In 3.0 there shouldn't be any remaining GC Allocs.
There were some related to our DispatcherSynchronizationContext incorrectly being used in Unity.
We also fixed the allocs generated by Rendering event and Measure/Arrange.

stonstad

stonstad

2020-04-22 16:51

reporter   ~0006235

Outstanding news, thank you Sergio! Stellar Conquest has over 100 screens and user controls, which always makes for a good test. I'll get it converted to B8 and share what I see. Thank you for making this change -- I'm super excited!

stonstad

stonstad

2020-04-23 20:16

reporter   ~0006248

Sergio,

The allocations caused by using OnGUI in NoesisView.cs remain. Noesis should not be using OnGUI external to the editor because it is not designed for production use.

See https://www.noesisengine.com/forums/viewtopic.php?f=3&t=1867&p=10600&hilit=ongui#p10600

According to Unity:

"The Immediate Mode GUI system is commonly used for:

Creating in-game debugging displays and tools.
Creating custom inspectors
for script components.
Creating new editor windows and tools to extend Unity itself.

The IMGUI system is not generally intended to be used for normal in-game user interfaces that players might use and interact with."

jsantos

jsantos

2020-05-08 12:32

manager   ~0006333

I am going to mark this as solved. @stonstad could you please create a new ticket about OnGUI events and GC allocs?

Issue History

Date Modified Username Field Change
2020-01-16 16:15 stonstad New Issue
2020-01-16 16:15 stonstad File Added: GC Allocations 1.PNG
2020-01-16 16:16 stonstad File Added: GC Allocations 2.png
2020-01-16 16:16 stonstad Note Added: 0006077
2020-01-16 16:17 stonstad Note Edited: 0006077
2020-01-16 17:43 stonstad Note Edited: 0006077
2020-01-21 16:48 stonstad File Added: No Alloc.PNG
2020-01-21 16:48 stonstad File Added: Alloc wNoesis.PNG
2020-01-21 16:48 stonstad Note Added: 0006078
2020-01-21 16:48 stonstad File Added: No Alloc-2.PNG
2020-01-21 16:48 stonstad File Added: Alloc wNoesis-2.PNG
2020-02-05 18:24 sfernandez Assigned To => sfernandez
2020-02-05 18:24 sfernandez Status new => assigned
2020-02-05 18:24 sfernandez Target Version => 3.0.0
2020-02-05 18:24 sfernandez Description Updated
2020-04-09 17:35 stonstad Note Added: 0006183
2020-04-21 16:54 sfernandez Status assigned => feedback
2020-04-21 16:54 sfernandez Note Added: 0006232
2020-04-22 16:51 stonstad Note Added: 0006235
2020-04-22 16:51 stonstad Status feedback => assigned
2020-04-23 20:16 stonstad Note Added: 0006248
2020-05-07 20:10 sfernandez Assigned To sfernandez => jsantos
2020-05-08 12:32 jsantos Status assigned => resolved
2020-05-08 12:32 jsantos Resolution open => fixed
2020-05-08 12:32 jsantos Note Added: 0006333
2020-05-08 12:32 jsantos Fixed in Version => 3.0.0
2025-10-10 13:29 jsantos Category Unity3D => Unity