[NodeCanvas] Small memory allocation when changing the active subgraph

Forums 💬 NodeCanvas 🗨️ General Discussion [NodeCanvas] Small memory allocation when changing the active subgraph

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #13006
    leanon00
    Participant

      Hello! Hope this can be fixed.

      I found a memory allocation when changing the active subgraph in a very common usage pattern
      this allocates memory because of the lambda variables scope capture.

      Attached the stack trace from a deep profiling in unity where it allocates 160 B for every sub tree change.

      #13011
      Gavalakis
      Keymaster

        Hello!

        You are right. I plan to do another review of everything soon (something I typically do once in a while to refactor things), and will fix this 🙂

        Thank you.

        #13010
        viktor
        Participant

          Hello!
          Could you clarify, is that problem resolved in new versions?

          #13009
          Gavalakis
          Keymaster

            Hello! It is not exactly a problem but rather a small allocation when using subgraphs specifically. I do however want to fix this so that it does not allocate at all in this case. Thank you.

            #13008
            poisonousjohn
            Participant

              Hi there, though the allocation is small, it accumulates over the time leading to GC triggering. In our game we have requirement to not allocate more than 300B per frame (unity recommendation), which is not possible to satisfy because of the NodeCanvas

              We would appreciate if you fix it.

              #13007
              Gavalakis
              Keymaster

                Hello there. If it is a showstopper for you now, I can send you a quickfix to your email. If so please send me an email to support_AT_paradoxnotion.com.

                Best regards.

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