JCPalmer Posted May 14, 2015 Share Posted May 14, 2015 In my morphing using SIMD testing, i finally switched to using the profiler. My measurements of deformation CPU are just not reliable. The Firefox Nightly profiler is kind of messed up though. I dropped back to my non-SIMD calls, and ran on FireFox 37 to get a base line. Found that updating positions & normals was only 0.78% of total CPU used, anyway. The split between evaluationMeshes & render was 32.85% & 55.76%, respectively. What surprised me is 9.54% of the total cost was in StandardMaterial.isReady().Going to Babylon.Material, I see there is a way to avoid paying this tax foreverrrrrrrrrrrrrrrrrrrr.public checkReadyOnEveryCall = true;public checkReadyOnlyOnce = false;Unfortunately even if I switched all my materials to checkReadyOnlyOnce = true;, in the Babylon.StandardMaterial override of isReady(), where checkReadyOnlyOnce is taken into account is commented out . DK, I realize I been a pain in the ass ever since finding out I could do profiling, but this just does not scale. Amdahl's Law dictates that speed up is limited greatly by the amount of time spend doing things serially, i.e. javascript. Would not mind, if it went away after a few frames. Can that line can be un-commented? With either grabbing textures that are already stored locally in the app, or in-lining textures right into source code for the web, this should be largely avoidable. Quote Link to comment Share on other sites More sharing options...
Temechon Posted May 14, 2015 Share Posted May 14, 2015 Why is this line commented already ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 14, 2015 Share Posted May 14, 2015 Actually it should not! Sounds like test I did and I forgot to uncomment Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 14, 2015 Author Share Posted May 14, 2015 There is a comment right after that too.if (!this.checkReadyOnEveryCall) { if (this._renderId === scene.getRenderId()) { // return true; }}FYI, does anyone even know this is here? I only ask, since it is not the default. Did a forum search on 'checkReadyOnlyOnce'. This is the only topic found. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 14, 2015 Share Posted May 14, 2015 Fixed! Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 15, 2015 Author Share Posted May 15, 2015 Ok, now that the business end of checkReadyOnlyOnce is no longer commented out, I performed some comparison analysis. First I re-did the base-line, that is defaulting to checkReadyOnlyOnce = false. Also the scene had 28 materials, 2 textures. For best repeatability, I am using a standard size for my window, half width that you get from dragging the title bar off the screen. FYI, since performance metering cannot be turned on / off in code, it is very difficult to numbers from different runs real close.This run isReady is 7.2%. After checkReadyOnlyOnce = true on all materials, a re-run drops isReady way down to 2.07%. Of course now, everything else is a higher percentage.Wondering if having a static to set for all materials would be good.Material { public static CHECK_READY_ONLY_ONCE_FOR_ALL = false;}StandardMaterial{ public isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean { if (this.checkReadyOnlyOnce || Material.CHECK_READY_ONLY_ONCE_FOR_ALL) { if (this._wasPreviouslyReady) { return true; } } ... }} 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.