Guest Posted February 1, 2018 Share Posted February 1, 2018 It renders immediately on my computer. Running with the profiler, can you check where the CPU time is spent? Quote Link to comment Share on other sites More sharing options...
Hillardo Posted February 2, 2018 Author Share Posted February 2, 2018 It needs about 7 to 8s until it is rendered on my computer. My function TextureCreat runs for 2s, but 1.6s are used by CreateForMesh from Babylon.GUI. Then there is Animation Frame Fired twice one time for 1.6s and then 1.17s. The profiler marks this parts as bootleneck. Recalculate Style and Layout are both called around 160 times. I read that these are caused by changing the size of elements. I altered my code, so that I write, read, write, read and write in five blocks. Before I had write, read,k write, read and write and that looped 50 times. But it didn't change the performance or the appearance of Recalculate Style and Layout. Updated Playground: https://www.babylonjs-playground.com/#BGCWDH#1 Quote Link to comment Share on other sites More sharing options...
Guest Posted February 2, 2018 Share Posted February 2, 2018 You are generating quite a big number of textures and doing a lot of operation in your TextureCreate To identify the bottleneck, I would recommend reducing number of box and also stripping off so part of the code to understand where the CPU is most used Every single GUI texture will require a canvas, a texture in memory and text rendering so I'm not sure you can render all that amount of texts without waiting a bit 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.