Too many GC Alloc !

NodeCanvas Forums General Discussion Too many GC Alloc !

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #9195

    Hi Gavalakis,
    I started using NC about 2 months ago ,it’s very useful for developing AI and game logic .

    Now I have a problem with GC alloc.
    I use many ‘get property’ actions and ‘execute function’ actions in my game.
    I found that a ‘get property’ action will cause 3KB GC alloc, and an ‘execute function’ action will cause 1.2KB GC alloc.

    To Test this problem ,I create a simple tree only include a ‘get property’ action and an ‘execute function’ action.
    the script on the agent :
    public class TestScript : MonoBehaviour
    {
    public int testProperty{get {return 0;} }
    public void Test() {}
    }

    When the game is playing, profiler window show that MonoManager.Update() have 4.2KB GC alloc per frame.

    If the game has 30-50 behaviour trees ,and each behaviour tree has 10-30 actions, the GC alloc can be more than 1MB per frame.It’s very terrible.

    How can I deal with this problem?

    By the way ,my NC version is 1.5.3

    #9200
    Gavalakis
    Keymaster

    Hello,

    I have some leads as of what might be causing this in the “Script Control” tasks after some latest refactors I did.
    Please allow me some time and I will fix it.

    Thanks for reporting!

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

    #9199

    oh, no, I‘am afraid to use nodeCanvas, Too many GC Alloc, it’s very Fatal to a game

    #9198
    Gavalakis
    Keymaster

    @kongbu The high GC allocation happens only to the Script Control category tasks and it will be fixed soon.

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

    #9197

    I’m seeing some very high GC allocs as well in our project. Hope there can be a patch soon. Currently using 1.5.8.

    #9196
    Gavalakis
    Keymaster

    Hello,

    Please update to the latest version whenever you can. The current version is 1.5.9d.
    Let me know if you still get high GC allocations and if so, please provide me some more info / graph screenshot, or even if possible a sample project where you encounter this.

    Thanks

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

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