GC allocs in FSM/Composite Graphs

NodeCanvas Forums General Discussion GC allocs in FSM/Composite Graphs

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8953

    Hi Gavalakis,

    I’ve been deciding if I want to use NodeCanvas in a very resource constrained project, and the fact that your behavior trees don’t create any GC allocations is really nice. However, I noticed that FSMs and composite graphs (i.e. FSMs with behavior tree nodes and behavior trees with FSM nodes) actually have a good bit of GC allocations associated with them. Do you have any future plans to get rid of those? Or is it possible I’m doing something incorrect when setting up those graphs?

    #8955
    Gavalakis
    Keymaster

    Hello,

    I took a look again and found the issue for the FSM, which in practice was a bad call, which you can fix easily as well 🙂
    Please open ActionList.cs and replace line #86 (the bad call) with:

    if (finishedIndex.Count == actions.Count)

    Notice that this is a temporary fix for now, because it will not take into account the disabled actions (through the UI checkbox).
    I will make sure it does for the next update along with some further improvements.

    Let me know if this fixed the GC issue for you 🙂

    Thanks,
    Gavalakis Vaggelis

    Join us on Discord: https://discord.gg/97q2Rjh

    #8954

    Yep! That knocked off a good chunk of the GC alloc I was seeing. Thanks for the suggestion!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.