[PERFORMANCE] Standard Node need optimization.

Forums 💬 NodeCanvas ⚙️ Support [PERFORMANCE] Standard Node need optimization.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15887
    driiade
    Participant

      Hi,

      I come here just because I checked standard node behaviour, like ActionNode, ConditionalNode, Selector and Sequencer.

      Firstly, having possibilities to parameter them for dynamic or not dynamic is cool. But I found a lot of performance lost with all these parameters which are only used when setting behaviour. We don’t need these parameters when running the game, and a lot of if/else are checked for nothing during Update loop.

       

      I mainly rewritten all these nodes to do 1 thing at time and replaced them all accordingly. So now I have Dynamic_Selector, Simple_Selector etc etc etc.

      I found the gain was HUGE (like more 10% of the CPU time).

      I think keeping parameters on Node are really cool because easy to setup, but maybe at runtime if a Node is dynamic you could instantiated the dynamic version of this Node ? Or serialize it as the Dynamic version of the Node so we could cut the runtime if between dynamic and not dynamic ?

      Some of them really need to be optimized, like the Selector which constantly check bool array to know if an action is ended or not. I don’t want to enter in detail but you can just keep a list of action to execute.

      The action user runtime enabled could be cut on runtime and only accessible for editor ? (99% of the nodes would not use this ?)

      It’s just a ideas to upgrade the tool which all of us need to do better games 🙂

       

      We will (I think) use NodeCanvas for futur production (which become bigger and bigger), and I don’t know if you have a plan to optimize it ? Or a way to work with you ?

      #15889
      Gavalakis
      Keymaster

        Hello again,

        As per my reply on your other thread, there are always optimizations to be made 🙂
        The Dynamic and non-Dynamic versions of nodes could be separated more. The Selector node does not check any bool array however. Are you referring to something else other than the Selector please?

        Thanks!

        #15888
        driiade
        Participant

          Hello,

          Yeah maybe I confused with the parallel action task. One of the standard class had a boolean array to check if the action ended and so not calling it.

           

          In all cases I think these node can benefit of a huge performance speed up with a replacement at runtime by their optimized version.

           

          It s small optimization but these nodes are repeated several times in a game. (I insist maybe too much on it :D)

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