TheGrimsey / oxidized_navigation

A runtime Nav-Mesh generation plugin for Bevy Engine in Rust.
Apache License 2.0
147 stars 9 forks source link

Add benchmarks #16

Open Elabajaba opened 9 months ago

Elabajaba commented 9 months ago

It's hard to optimize performance without them.

Maybe add criterion as a dev dependency, and create benchmarks for both creating and updating a navmesh (needs benches for both adding and removing obstacles), as well as a few different pathing benchmarks (near, far, unreachable, same polygon, etc).

It might be interesting to use the same meshes as recast does, but looking at them they looked very small, meaning we can't get eg. a long path benchmark from them.

I also looked at the moving ai pathfinding competition maps (https://movingai.com/benchmarks/voxels.html), but the 3d ones looked too split up to be usable for this library?

TheGrimsey commented 8 months ago

Maybe add criterion as a dev dependency I have create some criterion benchmarks, did not realise it was that simple to use....

and create benchmarks for both creating and updating a navmesh (needs benches for both adding and removing obstacles), The nav-mesh is recreated from scratch with each update anyway so I don't know if that's worth benchmarking.

I don't know if you can make retaining parts of the nav-mesh work without a lot of memory overhead.

It might be interesting to use the same meshes as recast does, but looking at them they looked very small, meaning we can't get eg. a long path benchmark from them.

That could definitely be interesting. Would give a more real-world example than the arrangement of cubes currently present.

I also looked at the moving ai pathfinding competition maps (https://movingai.com/benchmarks/voxels.html), but the 3d ones looked too split up to be usable for this library?

Hmmm, haven't seen these before. Yeah, they might be a bit too advanced. Don't have a way to jump between separate nav-mesh islands 🤔