SharpNav icon indicating copy to clipboard operation
SharpNav copied to clipboard

memory usage generating navmesh

Open gamemachine opened this issue 11 years ago • 3 comments

A mesh with 524,000 triangles used up 2.6GB of ram to generate.

Same mesh in recastnavigation never went above 80mb ram usage.

I was using basically the same code on the front wiki page, starting with my own array of triangles and then calling TriangleEnumerable.FromTriangle, etc..

Navmesh.Generate is where it blew up the memory.

gamemachine avatar Jul 25 '14 02:07 gamemachine

Fed it another mesh of roughly the same size without any issues, must be some edge case that caused the problem with the first mesh.

gamemachine avatar Jul 25 '14 03:07 gamemachine

There are still a few bugs in the later steps of generation that may cause something to be allocated multiple times. I can look into it a bit if you can/want to send me the mesh that caused the bug.

Robmaister avatar Jul 28 '14 23:07 Robmaister

@gamemachine The OBJ file that triggers the edge case would be very useful to have for debugging purposes. Could you please email me the file when you get a chance?

Robmaister avatar Oct 20 '14 23:10 Robmaister