dbawel Posted February 22, 2018 Share Posted February 22, 2018 Hello, I'm importing a new OBJ file with the MTL and texture into my scene every 30 seconds. When I import, I dispose of an existing OBJ and MTL, and declare their variable (array) as null. But my frame rate continues to drop as I add and dispose of objects - even though there is only 20 heads at a time in the scene - never more. But my fps drops from over 40fps to under 20fps once I add less than 10 new heads and dispose of an equal amount. I've even forced dispose, but fps still drops. Thanks, DB Quote Link to comment Share on other sites More sharing options...
adam Posted February 22, 2018 Share Posted February 22, 2018 Ideally, you should not be instantiating and disposing objects while your scene is running. You should try to reuse objects as much as possible. Use the object pool pattern. https://en.wikipedia.org/wiki/Object_pool_pattern Edit: On first read I thought that you were saying that your FPS dropped only when creating and disposing objects. If the FPS doesn't recover than I'd make sure you aren't inadvertently holding onto some references somewhere. It is possible that the issue is in BJS, too. I would still explore an object pool if that is compatible with what you're doing. Quote Link to comment Share on other sites More sharing options...
dbawel Posted February 22, 2018 Author Share Posted February 22, 2018 Hi @adam Unfortunately, I have to scan a new persons head and import into the scene in a game scenario. So we'll most likely scan over 1000 heads in 3 days. I am cloning and disposing as well - could this be a problem? Thanks, DB Quote Link to comment Share on other sites More sharing options...
Guest Posted February 22, 2018 Share Posted February 22, 2018 It should not. Which means that something is leaking can you share a repro? Quote Link to comment Share on other sites More sharing options...
dbawel Posted February 24, 2018 Author Share Posted February 24, 2018 Hi DK - @Deltakosh - I'm trying to find the memory leak. However, as we move closer to delivery, I'll be far more aggressive in tracking this down. So I'll share whatever I need once we get close to delivery - if I haven't solved it by then. But, right now there's allot I can try and optimize the scene and overall architecture in the process. Thanks for looking at this, as I know how busy you and your team are. And I guarantee you'll be impressed with what we're building, as it's something not yet seen in WebGL - and pushes Babylon.js to the limit. It has also received such a great response from the executive team in Japan, America, and internationally - that they have concrete plans to take the "game" onto stages internationally for highlighting the hardware abilities of the new super secret Sony phones and features which they alone contain. Sony is extremely happy with the Babylon.js framework, and appreciate all of your personal interest in the project and the support available to us as well as the entire Babylon.js user community. I'll be trying to get you or someone from your team here soon, as Sony realizes the dramatic potential which BJS provides us now and continuing to provide in the future. The general quality of rendering, animation, and all aesthetic and subjective elements of the content is far greater than what was ever initially imagined in our (Sony's) initial discussions concerning which framework to use on both the projected content as well as any mobile content. But I'll provide you with more info on this as soon as I'm able to do so - since our project and the release of the new hardware is extremely "hush hush" - as might be expected in such a highly competitive market. However, I can tell you that what is coming is a bit "mind-blowing" in many ways. But again, thank you for building such a well thought out and well functioning framework; and providing a level of support which is unprecedented in the open source community. I can hardly wait to tell you about what's coming - and hope I'm able to show you in the near future. Thanks again, David Quote Link to comment Share on other sites More sharing options...
Guest Posted February 25, 2018 Share Posted February 25, 2018 Much appreciated!!! 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.