Kilombo Posted June 3, 2014 Share Posted June 3, 2014 Good evening everyone, Did anyone noticed the exagerated memory consumption on the new last 1.12-beta version? It costs double the memory that 1.11 version consumes. Check the screenshoot. What does this new version brings that consumes this enormous amout of memory. It's to much for mobile devices for sure.Anyone else getted this problem? On the right side you have firefox running one instance of the game and it's consumming 666Mb of memory, that instance is running 1.12-beta. On the left side you have chrome running with a different user and is consuming less then a half of firefox (233Mb), chrome is running 1.11. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 This is not normal at all. The 1.12 is a HUGE new version so I will need your help to determine where is the problem. Do you have the same behavior on a small scene? (like this one for instance: http://www.babylonjs.com/?SPACESHIP) I need to isolate what is generating this issue. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 I did a first test. Using Heart scene (http://www.babylonjs.com/?HEART) Here is the memory usage using F12 tool: bjs 1.11bjs 1.12 beta: As you can see there is almost no difference (the 1.12 is even better). So there may be an issue with a specific feature you are using. We must find out which one Quote Link to comment Share on other sites More sharing options...
Moon Posted June 3, 2014 Share Posted June 3, 2014 Also, you should use the same browser if you want to compare.Test each browser with both versions then compare. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Hmmmm... Agree, I just made a new test with spaceship. And has you can see. Firefox does consume more memory (114Mb versus 81Mb), altough, 1.12 version is running on chrome and firefox is running 1.11. And the kind of difference that happened in my scene is not happening in this one. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Also, you should use the same browser if you want to compare.Test each browser with both versions then compare.The problem is that my scene has a database connection with users validation, so I need a new session for each user, and the only way that I found to test the communications in the same computer with different users was this way. Quote Link to comment Share on other sites More sharing options...
Moon Posted June 3, 2014 Share Posted June 3, 2014 Maybe you can use incognito or test them one after one.Anyway, it seems like FireFox consumes more than Chrome on your computer. In my case, I didn't look at memory consumption and I only use 1.11 for now, but Chrome is usually slower than FireFox in my scenes. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Delta, you can check for your self.http://andromedaquest.tk/map.php - here is version 1.12-beta (consuming 650Mb +/-) http://andromedaquest.tk/map2.php - here is version 1.11 (consuming 150Mb +/-) I tested both in Chrome. My first impression is that it must be related with this lines:camera.renderWidth = 4000;camera.renderHeight = 4000;camera.maxZ = 25000;or with : var chaoTeste = BABYLON.Mesh.CreateGround("chaoteste", 15000, 15000, 1, scene, false); Maybe the versions treat the cameras and the ground mesh differently, and some how in version 1.12 it is drawing everything in the first place, and in 1.11 is not (just a suposition). Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Share Posted June 3, 2014 I see that too. Firefox consumes a lot more (double) compared to Chrome.This is so that I now use Chrome as Firefox with WebGL is not great.So the problem is not the engine but Firfox. I'm using version 1.12 and I find it faster on my stage compared to previous version.By against version 1.12 fixes many bug that change the behavior of some thing on our stage and we used to find it normal but was not. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Thanks dad72, but that's not the real problem. I do have different results in the same browser (has you can check in my printscreens). I'm still trying to find out what is causing this. The difference is big between the two versions (1.11 and 1.12), altough is relationed with my project (or some feature that I'm using on it). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 Hum I think I know where the problem is! CreateGround now returns a GroundMesh which has some integrated features like automatic octree. The octree could be the problem here. Could you check with the newer version I've just pushed to github? Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Hum I think I know where the problem is! CreateGround now returns a GroundMesh which has some integrated features like automatic octree. The octree could be the problem here. Could you check with the newer version I've just pushed to github?Delta.... Unfortunately... It didn't work out Still a lot of memory in use. Check the printscreen. I'm going to start disabling features (one by one) to get the problem. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Delta. The problem is on the skybox. I commented out this:/*var skybox = BABYLON.Mesh.CreateBox("skyBox", 15000.0, scene); var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene); skyboxMaterial.backFaceCulling = false; skybox.material = skyboxMaterial; skybox.infiniteDistance = true; skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0); skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("Textures/Skyboxes/1_1/space", scene); skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;*/And the memory consumption droped from 630Mb to 96Mb. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 Could you check on this scene?http://www.babylonjs.com/?LIGHTS Do you have the same memory issue? Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 No problem on that demo. But don't forget, the skybox on the demo has size 100, and mine is 15000. Mine is huge in comparison. Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Delta, I found out that in IE it works just fine. Interesting thing. I can't explain it. The best memory performance (consumption) is on IE.The diference is huge.Try it yourself Delta go to my website and use the testing user (I'll keep it working for 1 or 2 days) username: experiencia2 password: xptourl: http://www.andromedaquest.tk Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Share Posted June 3, 2014 Why you do not use this for your sky. This allows to have a smaller size sky that always keeps the distance wish per report has your camera.skybox.infiniteDistance = true; Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 3, 2014 Author Share Posted June 3, 2014 Why you do not use this for your sky. This allows to have a smaller size sky that always keeps the distance wish per report has your camera.skybox.infiniteDistance = true; Well. The problem is that, things that are positioned in cordinates outside of the skybox do not appear in the camera view, by that, it's the same thing has if they weren't on the scene. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 3, 2014 Share Posted June 3, 2014 Ah ok, that explains your great skybox. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 The size of the skybox should not be a problem (this is pure geometries). Could you try with your skybox but with my textures??https://github.com/BabylonJS/Samples/tree/master/Scenes/Customs/skybox Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 3, 2014 Share Posted June 3, 2014 I created a bigger skybox and still no problem:http://www.babylonjs.com/playground/##2A6EL9 Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 4, 2014 Author Share Posted June 4, 2014 I created a bigger skybox and still no problem:http://www.babylonjs.com/playground/##2A6EL9Hi Delta, I think the problem is relationed with my texture. I tried with your textures and it worked just fine (consumed 132Mb of memory, a reasonable amout). Your textures are 512x512 mine are 2048x2048 (much bigger resolution and size). What's bothering me is that I don't understand why does this problem only appears on 1.12 version and not in 1.11.I'll stick with 512x512 resolution. Altough for the size of my skybox, we have to admit that it gets quite pixelized (it's a crappy resolution), but it will work for now. So... The problem is relationed to the textures. I tried to look at code to start figuring it out, but it's too many texture classes, and some extends others, I still don't have enough knowledge on the framework to be helpfull on this. Sorry Delta Quote Link to comment Share on other sites More sharing options...
Dad72 Posted June 4, 2014 Share Posted June 4, 2014 2048 * 2048 It is huge and has ban for use on browser. 512 * 512 and what is the most use in texture in the same professional games, see 1024 * 1024 maximum for HD, but more, it's too heavy. try with 1024 * 1024 or 768 * 768 Quote Link to comment Share on other sites More sharing options...
Kilombo Posted June 4, 2014 Author Share Posted June 4, 2014 2048 * 2048 It is huge and has ban for use on browser. 512 * 512 and what is the most use in texture in the same professional games, see 1024 * 1024 maximum for HD, but more, it's too heavy. try with 1024 * 1024 or 768 * 768You are right mate!. Indeed.... 2048*2048 is to big. Altough, there wasn't a problem when running on 1.11 and now we have a problem running on 1.12. And that's the point. We have to find out what's happening. I'll change my res to 1024*1024. Thanks anyway dad72. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 4, 2014 Share Posted June 4, 2014 I think I added mipmaps support to cubetexture. that's could be the problem. Could you try to create the cubetexture without mipmap? (latest parameter of the constructor) 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.