Hi there,
when i use reacastJSPlugin of BABYLON, it costs a large memory footprint. And after applying to the mobile device, my phone can not open the page.
So I check the playground demo, and below is the memory footprint case. It is about 930KB.
I’ve just tried with Edge, and I get a reasonable memory footprint compared to 2 other simple playgrounds
About 200Mb for the navmesh playground or the default one. Did you do something specific to get that number? Did you interact with the navigation playground?
EDIT: I’ve just tried on my Android phone without issue.
I did not interact with the scene. And for this playground demo, the only thing is initiating the plugin.
It is about 860Mb and can not apply to mobile phones for long term using.
And could you test this demo. it is to navigate on a mesh inspired by PatrolJS for ThreeJS.
About 38Mb for navigation. Is there any way to fix this memory footprint using?
If you open a tab with Babylon.js Playground (babylonjs.com) what is the footprint?
I’d be happy to fix that, I just need to know how it happens.
I looked a bit more and I can experience the same, the basic scene https://playground.babylonjs.com/#X5XCVT#649 is:
The one with recast initialized https://playground.babylonjs.com/#X5XCVT#645 is:
From the memory tools in chrome the snapshot shows that all of the overhead is the actual HEAP of the recast plugin. It probably means it is initialized like this:
I’ll check the build to see the amount of pre-allocated memory.
Plz let me know if there is any progress. Thanks
Should I open an issue on Github for this?
Yes please !
FYI @Cedric Memory leak of Crowd navigation · Issue #13595 · BabylonJS/Babylon.js · GitHub We could probably start with smaller footprint and dynamic memory or is it too slow ?
I’ve checked the build and the allocated size parameter is 64Mb
so, I think it’s a bit more complex than changing the build options. 1st thing to do is to try to repro in a new project.
There is a fix ! update recast.js with lower memory usage by CedricGuillemet · Pull Request #13609 · BabylonJS/Babylon.js · GitHub
That’s so great! Thanks for your updating.