Is it expected that the Layered Grid graph update (using graph update objects) would be significantly slower than one done on a regular grid graph?
Is it related to the size of the overall graph? I was hoping that the fact that it uses the bounds of the update object keeps the nodes to be updated to a minimum regardless of overall graph size.
I am using the version on the asset store, not the beta, don’t know if that matters.
EDIT: Seeing times of 300ms on a 600x700 graph, compared with maybe 10 ms or less on the old graphs.
It does use the bounds.
However a layered grid graph sometimes needs to create new node layers if you add geometry on top of other existing geometry. This can cause large spikes in the calculation time since it needs to go through all nodes. Also, the update might need to recalculate all areas (islands of nodes not connected to each other), this can also cause a large spike (but should do so for grid graphs as well). In certain situations when you know that your update will never separate two areas of the graph, you can pass requiresFloodfill = false to the GraphUpdateObject ( see http://arongranberg.com/astar/docs_FeatureFreeze/class_pathfinding_1_1_graph_update_object.php#a2efbcd7b73c47dce7781034f38b35da6 ).