Horrible 3D/Three.js performance in latest Safari on macOS

I’m currently running Safari Version 14.1 (16611. on macOS 11.3.1 (20E241) and since about last week, our app (https://app.shadowmap.org) seems to run ridiculously slow on this config. I am pretty convinced it is caused by the latest update for Safari.

Other browsers including Brave and Firefox on the same machine/OS run still fine. Safari on iOS behaves as well as ever too.

Does anyone have infos about what happened to Safari? Maybe has an idea how to compensate/fix the performance drop?

Do you see this performance degradation with other WebGL apps, too? What about the official three.js examples? three.js examples

1 Like

Like @Mugen87 said you should try track down the cause of the performance drop, the easiest way is starting with the official examples and possibly specific features you use that are also showcased in them, if everything works fine you can start isolating the issue by disabling features, reducing what you render or process.

Did you measured the performance yet?

1 Like

Very good point! I just tried some of the examples in Safari and – yes – they work significantly worse than some weeks ago. This even leads to the whole browser UI freezing, the machine becoming unresponsive. Again, same examples on the same machine in Firefox/Brave run perfectly smooth. Seems to be a bigger Safari issue.

A thought: renderer = new THREE.WebGLRenderer({ powerPreference: "high-performance" }); – maybe this isn’t activated or something?

It’s best if you report the issue right here: https://bugs.webkit.org/

Whether this problem is related to powerPreference or not is hard to tell. I mean you can try different renderer settings out and see if things improve. But it’s probably best if the devs from WebKit investigate the issue.

@molzer Did you ever find the culprit in safari? I’m seeing the same slowdowns on my machine for examples and other stuff too, but only in safari, both chrome and firefox are fine.

No, unfortunately no update. Also Safari Technology Preview is even worse.
I wonder whether it’s WebGL apps in general or only Three.js?

What machine do you have? On my side it’s a 2016 MBP with Radeon Pro 455 and integrated Intel HD 530 (doesn’t matter which one is active, the performance is a catastrophy).
The other one is a 16" MBP.

I have a 2019 16" MBP, AMD Radeon Pro 5600M 8 GB, I think it’s a software issue with safari 14, I’m running macOS 11.4, on older laptops in our company running safari 13, same demo runs fine. I found a few issues that may be related:

1 Like

Thanks for the links, @Lasse – it’s weird and fragmented. E.g., regarding powerPreference, on my MBP, the performance with the integrated GPU is now also far worse than before.

Irrelevant the active GPU, my computer starts freezing, even crashes sometimes when launching Shadowmap. It really feels like it has something to do with the “ANGLE” implementation. If you found a way out of this/hotfix, please share! :pray:

I just tested the latest Safari Technology preview (15.0, R128) on macOS 11.5 and Shadowmap runs perfectly fine, maybe even faster! If that’s where this all is going, I’m happy and hope for fall …

On the other hand, some three.js demos are still super slow (e.g., three.js examples).

Any other updates from other people affected by this?

The latest 129 preview release fixes the bug. The bug came from not respecting the request to use the discrete GPU it seems: Release Notes for Safari Technology Preview 129 | WebKit


Hallelujah :raised_hands:

Seems like the bug has re-appeared: 227408 – [macOS] WebGL content is unable to use the discrete GPU

not cool, thanks for the update @Lasse

Just upgraded to Safari 15 on macOS 11.6 and the performance is still bad. Just confirming the Technology Preview’s trajectory. Unfortunately.

reporting from march 2022, still terrible performance. it is very annoying to say the least.
tried shadowmap and my own project along with the examples in the docs. chrome just has more than double the framerate. very weird

Oh really? The problem disappeared after upgrading to macOS 12, Monterey. Make sure to have the “Experimental Features”:

  • WebGL 2.0
  • WebGL via Metal


Runs super smooth since then.

With latest iOS and macOS enabling WebGL 2.0 in Safari should not be necessary anymore since it is enabled by default.

that’s actually the first thing I checked before posting here and both were enabled (as @Mugen87 pointed out). Including GPU process: canvas rendering and WebGL. All on macOS
kinda sad but I lowkey have given up trying, working pretty well on chrome, almost triple the frame rate and loading speed. I will test it out later on a retired iPhone X sometime later.

Not sure if this is the same issue coming back to haunt us, vs. a new one, but I’ve run into a situation where Safari is using the integrated GPU instead of the dedicated GPU: Horrible Safari Performance - #2 by Mike_D

1 Like