Are paths cached?

Hey,

I’m just wondering if paths are cached? So if a path between the same 2 nodes are requested often (and the graph has not changed between request), does it use a previously cached version of the path?

I’m just thinking of possible ways to optimize our game, and figured this is one potential avenue but want to double check that the plugin is not already doing this.

Hi

No, paths are not cached. For most use cases it is very rare that a path goes between the same pair of nodes as an earlier path, so it would mostly just add memory bloat and performance overhead.

Also check out this page: http://arongranberg.com/astar/docs/optimization.php

1 Like