Hello,
I’ve notice that when a nested tree is called at runtime it generate garbage. Probably due to the fact that the nested tree is compute on the fly when the node is met. Is there a way to avoid this ? Like baking nested tree maybe ? Do I miss an option ?
Best
Eric
Yes, you are correct. Nested graphs are only initialized when they are first encountered (lazy initialization) and this is why at the first encounter only and due that initialization/deserialization, there is naturally garbage generated.
I am already looking at adding an option to “pre-initialize” everything if required, but it’s not something that is possible right now.
If you are in a hurry though, I can tell you some quick source code changes to make this happen.
Hello Justin
Thanks for your feedback. I keep in mind the possibility to update the source in case we need this soon.
Anyway after the nested graph is first encountered it still create garbage. I mean in the case the behavior tree owner has the repeat flag True, when the tree restart it create GB when it meets again the nested graph.
By the way. We are evalutating different solutions of BT, for now NodeCanvas globally is the one that suit the best our need.
Best
Eric
Thanks for your positive feedback. I am glad to hear that NodeCanvas suits your needs.
I will send a new update soon within this month which will also take care of the small allocation that happens after initialization when using SubTrees.
Thank you!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.