I’ve built a pretty simple babylonjs app that imports a scenery mesh, and spawns people as boxes. I had some people join in and noticed on my laptop that it started going crazy with fan noise and on peoples phone they reported things getting too hot. I did some performance profiling and found that the CPU was getting maxed out with background processing and raster threads taking too long. This was in production and also when I ran it locally. I went to the babylon playground and found much more complex projects that ran at a fraction of CPU usage. I then tried copying my code into the playground with no changes and saw that the performance was worlds apart.
So the question is, how does the playground work so well and how can I get my site to be as optimized. I already implemented the SceneOptimizer and while it has made a difference, it’s still ages away from the playground.
I’ve attached some screenshots of CPU profiling.
Running in production: