Hello. I’m trying to improve my performance and, besides many other optimizations I should do, I’m facing one of these tricky cases where it seems that performance drops down over time.
In this scene, once loaded (will take some time), I get > 30 FPS, 400 drawcalls and 100k Active Indices:
https://3dsmaps.com/3d/pos/@43.3855639,-8.4053317,43a,35y,169.4h,83.59t
You can get the inspector by clicking on “Settings > Inspector”.
Now, let’s move forward 500m (click+drag / WASD to move) into the line of buildings, wait for the scene tiles to load:
And now let’s move back to the original position. I disable the far away tiles, and indeed I can see the drawcalls get back to 400, but the FPS, Active Meshes and the Inter-Frame time never go back to original values, and I believe they keep accumulating over time:
I am quite suspicious of my code, as I’m doing the typical material replacements, instancing, freezing, and enabling/disabling… there’s a lot of room for errors. But I was expecting that after disabling culled tiles (entire branches in my node tree) indices would go down.
So… looking for some insight here. Is this expected (active indices not going down)? might this be some leak on Babylon side? is setEnable()
a good way of disabling map chunks or maybe should I move them outside the scene to some other container?
The end result is that after loading a few map tiles rendering becomes very slow, even in areas where there are not that many objects, after having loaded other tiles.
Thank you.