Robmaister / SharpNav

Advanced Pathfinding for C#
sharpnav.com
Other
537 stars 129 forks source link

memory usage generating navmesh #21

Open gamemachine opened 10 years ago

gamemachine commented 10 years ago

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 commented 10 years ago

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.

Robmaister commented 10 years ago

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 commented 9 years ago

@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?