High CPU usage in bufferSubData on Safari (v5.32.1)

Hi guys,

Suddenly I’m getting really slow frame rates on mobile (iPhone XS, iOS 16.1). Most of the time is spent in bufferSubData in engine.uniformBuffer, and engine.dynamicBuffer.

It’s a simple scene, all materials are standard, and everything is very low-poly. Runs without breaking a sweat on Chrome, but very slow on Safari - can’t hit 60 fps even on MacBook Pro, and single digits on iPhone.

I swear this used to hit 60 fps on the phone… Maybe a recent change in the engine?

UPDATE: After setting engine.disableUniformBuffers, Safari performance is fine, even on a phone.

Can you try to turn off webgl2 maybe?

I am wondering if they suffer from the Same than Chrome on MacOS as they now use a angle backend… @Deltakosh do you want me to flag Safari to disable UBO as well ? I thought this would be fixed when angle would turn the metal backend on ?

If this is the cause: OH YEAH!

2 Likes

@alekop can you share a repro ? so that I can validate my fix ?

I didn’t turn off WebGL2, but disabling UBO on Safari solved the issue.

I can’t find a PG that shows this issue. What’s the fix? If it’s turning off UBO on Safari, I’m already doing that, so it should be fine.

Could you share your experience or something I could use to validate the fix ? as currently I am not able to repro and I do not want to turn it fully off for everyone if it is not faster in the majority of cases.