haestflod Posted May 1, 2017 Share Posted May 1, 2017 Hi, I was optimizing memory usage for my babylon app and I stumbled across this property scene.importedMeshesFiles // Imported meshes public importedMeshesFiles = new Array<String>(); https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.scene.ts#L603 In my application it was using over 25 mb of memory storing all the loaded .babylon mesh files and from what I can see it's not used anywhere except in the playground code. https://github.com/BabylonJS/Babylon.js/blob/8ff548e2fdb9a203ac5b29e6a662a7d48220f2af/Playground/js/index.js#L477 Can I assume it's safe to clear the importedMeshesFiles every time I load a mesh to reduce memory footprint or would it cause any issues? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 2, 2017 Share Posted May 2, 2017 Yes this is perfectly safe no problem Quote Link to comment Share on other sites More sharing options...
haestflod Posted May 2, 2017 Author Share Posted May 2, 2017 Great, thanks! Should the importedMeshesFiles array be cleared on scene.dispose() as it could potentially leak memory? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 3, 2017 Share Posted May 3, 2017 it will be in next commit Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.