-
-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allocations for a large mesh are reaching 1GB of allocation to generate nav mesh. #61
Comments
Switching to the ArrayPool instead of having the static reference seems to fix the test issue and performs as well in allocations as far as I can tell. The next thing to look into is the RcSpan allocations, I cant seem to create the same fix so I will need something different for that issue. |
@Doprez Hello! I wanted to inform you that we received a PR regarding this matter. One has been merged, and the other one is currently under review.I've been quite busy with work lately and haven't been able to pay much attention, but I'll try to make the necessary adjustments as soon as possible. Could you please send me the test obj model that I can review? |
I added it to a repo here with the cube https://github.com/Doprez/RandomFileShare/blob/main/500x500-cube.obj Its the default cube from blender scaled high. I also tried with your large terrain example and the same issue is there but with less allocations. I am wondering if more verts helps in some odd way but I havent been able to properly test that thought. If I have some time after work today I will try to make a PR for the Single/float allocations. I was happy to see someone took care of the RcSpan because that one was stumping me a bit lol. edit: nevermind about my PR that person beat me to it lol |
Oh wow, after some quick testing with my previous project the difference is huge!
I dont even see I think this is good to close for the initial reported issue, Ill open a new one if something comes up. Thank you! |
I was messing around with the library and wanted to test a larger scene for an RTS example using a default cude in Blender that I scaled to 500x1x500.
I definitely expected a regression in performance but are these allocations correct or is there a known issue with the navmesh generatioon?
I collected some stacktraces of the memory from DotMemory here:
Single
s being allocated, mostly fromDividePoly
.RcSpan
s being allocated byAddSpan
There are a couple more that are also allocating a couple hundred MBs but these 2 are by far the most agressive it seems.
The text was updated successfully, but these errors were encountered: