Aysnc Additive Graph Deserialization

Optimizing graph deserialization is a bit tricky since it’s very serial at the moment (everything reads from a file), and a large part of it is just allocations that parallelize badly in any case. I have some optimizations that I’ll include in the next update, but it’s not much.

To save and load recast graph chunks, I could instead recommend the method recastGraph.ToTileMeshes and recastGraph.ReplaceTiles, which will be available in the next update. In my testing it’s about twice as fast.

Or you can use the NavmeshPrefab component, which is already available and uses the same internal apis. It should load faster, and you’ll be able to load chunks on a tile-by-tile basis, instead of the whole graph at once.

1 Like