WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
171597
REGRESSION: WebGL low performance of layer compositing in cross-origin iframe
https://bugs.webkit.org/show_bug.cgi?id=171597
Summary
REGRESSION: WebGL low performance of layer compositing in cross-origin iframe
Nik S
Reported
2017-05-03 04:01:46 PDT
High sizes of webgl canvases may cause composing layout performance issues. Expected behavior: 60 FPS without UI freezing. In other words, performance on par with other browsers (Chrome and Firefox). Actual behavior: <15 FPS (roughly) with frequent UI freezing. Steps to Reproduce: 1. Open
http://jsfiddle.net/unlimit/3pwbLfmn/70/embedded/result/
in Safari 10.1 (make sure that you open Safari on built-in Retina display); 2. You can see FPS on the top left corner (33 FPS for my hardware); 3. Click or click-and-dragg on canvas then you can see increase FPS (up to 45 for me); 4. After steps above you can feel low framerate and UI freezing; 5. Press ‘Enable Safari fix` to get rid of UI freezing. Testing hardware: MPB, 13”, Early 2015, 2,7 GHz Intel Core i5, 16GB, SSD, Intel Iris Graphics 6100 1536 MB. macOS 10.12.4, Safari 10.1 (12603.1.30.0.34,
r216107
)
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2017-05-03 17:07:59 PDT
On a 15" Mac Book Pro (Mid-2015), I get 60 FPS in shipping Safari/WebKit, and 33 FPS in nightly. I didn't get UI sluggishness after step 3, but this machine has a much more powerful GPU of course.
Radar WebKit Bug Importer
Comment 2
2017-05-03 17:17:25 PDT
<
rdar://problem/31977191
>
Simon Fraser (smfr)
Comment 3
2017-05-03 18:21:01 PDT
This started with
https://trac.webkit.org/changeset/210372/
Alexey Proskuryakov
Comment 4
2017-05-03 20:43:00 PDT
> This started with
https://trac.webkit.org/changeset/210372/
But this doesn't reproduce for me in shipping Safari/WebKit, which should already have this change in.
Nik S
Comment 5
2017-05-04 00:45:58 PDT
(In reply to Alexey Proskuryakov from
comment #1
)
> On a 15" Mac Book Pro (Mid-2015), I get 60 FPS in shipping Safari/WebKit, > and 33 FPS in nightly. > > I didn't get UI sluggishness after step 3, but this machine has a much more > powerful GPU of course.
I've just test demo on 15" MBP Mid 2016 with active integrated GPU (Intel HD Graphics 530) and I couldn't reproduce UI sluggishness. However, it is reproduced for my real application on 15" MBP Mid 2016. Unfortunately I can't share this app so I'll try to prepare another demo for 15" MBP.
Simon Fraser (smfr)
Comment 6
2017-05-04 08:28:32 PDT
I was able to clearly reproduce this on my older MacBook Pro (the first Retina model), and autospade it to
r210372
.
Dean Jackson
Comment 7
2017-05-04 11:45:19 PDT
This is actually expected behaviour. On some hardware, the integrated card is good enough to run your demo at a nice framerate. On others, it isn't. If you really need to get maximum performance, you can opt in to using the discrete GPU by using the powerPreference context creation attribute:
https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1
Alexey Proskuryakov
Comment 8
2017-05-04 12:55:21 PDT
I also bisected, and found the
r215070
to be the culprit. That matches the symptom of the FPS going up after interacting with the page. Maybe that's still expected behavior, but it feels questionable to me.
Nik S
Comment 9
2017-05-04 12:57:43 PDT
(In reply to Dean Jackson from
comment #7
)
> This is actually expected behaviour. On some hardware, the integrated card > is good enough to run your demo at a nice framerate. On others, it isn't. > > If you really need to get maximum performance, you can opt in to using the > discrete GPU by using the powerPreference context creation attribute: > >
https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2.1
Thank you for explanation. However, I guess that there is another case. Could you please explain why on the same integrated GPU (Intel Iris Graphics 6100) I can get so different FPS values when safari fix is enabled/disabled? In this demo
http://jsfiddle.net/unlimit/3pwbLfmn/85/embedded/result/
fix button just add renderer.context.finish(); webgl context finish call.
Simon Fraser (smfr)
Comment 10
2017-05-04 13:57:03 PDT
I think this is a combination of two issues. The first is that we now throttle rAF in cross-origin iframe to 30fps after
http://trac.webkit.org/r215070
, and this test case hits that. The second is that on some hardware, low-power GL performance is much worse than high-power GL performance.
Nik S
Comment 11
2017-05-04 14:16:06 PDT
Thanks for reply. (In reply to Simon Fraser (smfr) from
comment #10
)
> I think this is a combination of two issues. > The first is that we now throttle rAF in cross-origin iframe to 30fps after >
http://trac.webkit.org/r215070
, and this test case hits that.
Oh, thanks for information I don't now it. But in my another test without iframe I faced with the same issue and fps was much less than 30.
> The second is that on some hardware, low-power GL performance is much worse > than high-power GL performance.
I didn't quite understand this point because I tested my demo page on MPB 13" without high-power GPU.
Alexey Proskuryakov
Comment 12
2017-05-04 15:36:01 PDT
> But in my another test without iframe I faced with the same issue and fps was much less than 30.
Could you please make that test available to us? Is that a regression in nightlies too, or can you reproduce in shipping Safari? May be best to file a separate bug about that, as this bug tracks the regression from cross-origin throttling, and is already confusing enough.
Nik S
Comment 13
2017-05-10 08:43:56 PDT
I've created another report with detailed description see
https://bugs.webkit.org/show_bug.cgi?id=171924
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug