Bug 186236

Summary: [Three.js] BoxHelper - performance issue when updating on Safari.
Product: WebKit Reporter: damochramowicz260
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Critical CC: dino, jonlee, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 11   
Hardware: Mac   
OS: macOS 10.13   
Attachments:
Description Flags
TestCase none

Description damochramowicz260 2018-06-02 07:48:58 PDT
As the title says, Safari literally chokes itself, whenever I try to update BoundingBox of model like 3DBenchy (the framerate is at 4FPS at best). I tried on different Macs (El Capitan, Sierra, High Sierra, with and without external Video Card), and there was the same problem. Funnily enough, whenever i switch to a different browser (like Firefox or Google Chrome) it works with rock solid 60FPS on the same machine. 

I was able to isolate the test case, and you can see it here: https://damoch.github.io/three-test/

If you open the console, there is "API", that you can mess around with:
* rotate = false //disables rotation of object
* updateBox = false // disables update of bounding box on every frame
* helper.update() // updates bounding box
* loadStl(path) // loads STL file from path (I'm not sure if it works). if called without parameter, it loads default file, which is 3DBenchy.stl.

I've opened issue on three.js issue tracker already -> https://github.com/mrdoob/three.js/issues/14201
Comment 1 Radar WebKit Bug Importer 2018-06-02 11:51:22 PDT
<rdar://problem/40749690>
Comment 2 damochramowicz260 2018-06-04 07:02:55 PDT
Created attachment 341901 [details]
TestCase

I was able to reproduce this on WkWebView control in Cocoa, so it's not limited to Safari.