I notice a significant increase of computation time when calling new recast.NavMesh().build() using preview version of recast.js. I can reproduce the issue in the following PGs.
I can repro but it’s related to the flag I was thinking of. This is weird because it’s the same compilation flags as before. I’m investigating …
This is getting interesting!
When I get weird things, I usually check if anyone experienced the same issue.
I got to this GitHub issue:
So, I naively tried with -O0 build … and it’s 10 times faster than -O3. (output .js is 3Mb instead of 700Kb btw)
So, Emscripten is definitely doing some crap optimization because of some code. I need to find what’s causing that now.