FPS deteriorates on canvas resize, improves after switching browser tabs?

I observed this behavior in both Chrome and Edge when rendering scenes created in real-time with GPU. When the scene initially loads or canvas size changes, FPS fluctuates at 60 plus minus 10, and the scene seems flickering a little when moving probably due to fluctuating FPS; however, if I switch browser tab for a couple of seconds and get back to the scene, FPS stays at 75 constant, and everything becomes super smooth afterwards. Is this expected behavior? I am just curious, thanks in advance for any insight.

This may be a browser ( or even operating system ) thing if I were to guess, but I can’t say that for sure. I have noticed similar oddities, mostly on intel GPU or mobile devices (chrome browser) during tests. I haven’t taken the time to correlate when this happens but I do quite a lot of device testing and have seen this behavior many times.

Thanks. Good to hear others had also seen this. I was trying to figure if this is a Babylon, browser/OS or even hardware/GPU related. I see this on Intel Nvidia GPU hardware accelerated PC. Thought it may not be a browser issue as it happens in both Chrome and Edge but not sure. Have you tried any scene optimization to see if it helps?

How powerful is your computer for the scene which you are testing?

The PC has a GTX 1660, which I think should be good enough to handle about 20 something spheres generated on the fly. The interesting thing is, when the fluctuating FPS is causing the scene flickering, it does not help to delete all the meshes, but switching tabs helps.

I wonder if you do not create too much garbage collection pressure, can you share a repro in the playground ?

You wouldn’t be using OIT in your scene, yes? Because, I had some faen issues similar to this with this (fairly new) feature. Flickering with heavy FPS drop. Else, I can confirm 20 spheres on your rig is like ‘a day at the beach :beach_umbrella:’ for rendering a bjs scene (even with 30 tabs open in the browser). Not that I recommend opening 30tabs in browser. You shouldn’t take example of my odd usage of it :laughing: At this stage, I believe a PG would help (if possible).

Hello just checking in, was your question answered? @newbee