Reply To: BT Performance issues with 100-200 agents

NodeCanvas Forums General Discussion BT Performance issues with 100-200 agents Reply To: BT Performance issues with 100-200 agents

#15785
timheijden-triangle
Participant

Hi, thanks for the responses, time to go “deeper”!

First things first, regarding GC-Alloc. This was mostly caused by inefficient use of retrieving the name that for Profiler.BeginSample(). You can see this in the original screenshots as well, with the no-debug screenshot only having 1.1KB as opposed to 100+KB. To take away doubts, I’ve cleaned that up. The 1.1KB that remains comes from 2x 0.6KB IGraphAssignableExtensions.TryStartSubGraph() as you can see in the first attachment.

It is a bit difficult to get good information when deep profiling a graph-based tool like NodeCanvas, because the profiler does a lot of nesting, but also because deep profiling adds a lot of overhead to some operations but not so much others (IIRC).

Resetting nodes is an example of this, I’ve added 2 attachments regarding them. They occur a total of 9 times in varying costs, none of it seems related to what I’ve done inside OnReset() callbacks or anything, but rather the resetting itself. (2 screenshots not made in same frame)

Finally, another screenshot showing a bit more of the custom nodes that I’ve made actually doing stuff, so yes there is definitely some cost to operations I am doing, but just like in the original post the cost only amounts to a small portion of the total.

I’m afraid adding profiler markers will only further obfuscate the data, unless there is a better way of doing this?

Attachments:
  1. paradox-gcalloc.png

  2. paradox-time-reset.png

  3. paradox-time-reset-search.png

  4. paradox-time-deep1.png