Long graph update time when using multiple GraphUpdateObjects i

Hey,

We were using version 4.2.18 until now in our project. We have now decided to update to 5.0.9, and I found one weird thing. We are using a grid graph, and at the start we need to initialize each node with a different tag, so we were creating a GraphUpdateObject for each node to set a tag with it. In the old version, it took under 15 seconds, but in the new one, it takes about 3 minutes and 30 seconds.

I already rewritten it to directly modify the graph data, which is much faster, but I still wonder why there is such a huge difference in time between the old and new versions. Is it because it now runs asynchronously and creates a new thread for each GraphUpdateObject, and creating the thread has a bigger overhead?

Thanks in advance for any answer.

Hi

Yes, there’s some extra overhead per update in v5. It’s faster for larger updates, but slower for tiny ones. There’s a lot of job scheduling overhead and conversions to native data that take time.

Take a look at the upgrade guide for more info: Upgrade Guide - A* Pathfinding Project

You may be interested in writing a custom grid graph rule: Writing Custom Grid Graph Rules - A* Pathfinding Project