Bug 224843

Summary: GPUProcess launches unnecessarily when loading the amazon front page
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: MediaAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, changseok, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, jer.noble, lingcherd_ho, peng.liu6, philipj, sergio, simon.fraser, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
ews-feeder: commit-queue-
WIP Patch
none
WIP Patch
ews-feeder: commit-queue-
WIP Patch
none
Patch
none
Patch
none
Patch none

Description Chris Dumez 2021-04-20 17:04:04 PDT
GPUProcess launches unnecessarily when load the amazon front page.

The Amazon front page is only using the HTMLMediaElement for feature detection, there should not be any need to launch the GPUProcess in this case:
```
l = {
                audio: function() {
                    return !!h.createElement("audio").canPlayType
                },
                video: function() {
                    return !!h.createElement("video").canPlayType
                },
```
Comment 1 Chris Dumez 2021-04-20 17:05:06 PDT
Created attachment 426618 [details]
WIP Patch

Works on iPad with amazon.com (no GPUProcess). Will do more testing and polish the patch tomorrow.
Comment 2 Chris Dumez 2021-04-20 17:19:07 PDT
I am currently A/B testing the change on PLUM3.
Comment 3 Chris Dumez 2021-04-20 19:00:03 PDT
Created attachment 426630 [details]
WIP Patch
Comment 4 Chris Dumez 2021-04-20 19:26:54 PDT
Created attachment 426634 [details]
WIP Patch
Comment 5 Chris Dumez 2021-04-21 08:09:27 PDT
Created attachment 426690 [details]
WIP Patch

Should hopefully pass all the tests now. This seems to be a ~3.6% PLUM progression on iPhone so definitely worth pursuing.
Comment 6 Chris Dumez 2021-04-21 08:26:06 PDT
Created attachment 426692 [details]
Patch
Comment 7 Chris Dumez 2021-04-21 10:13:34 PDT
Created attachment 426706 [details]
Patch
Comment 8 Chris Dumez 2021-04-21 11:29:54 PDT
Created attachment 426716 [details]
Patch
Comment 9 Eric Carlson 2021-04-21 13:28:22 PDT
Comment on attachment 426716 [details]
Patch

This is great, thanks Chris!
Comment 10 EWS 2021-04-21 13:53:09 PDT
Committed r276389 (236864@main): <https://commits.webkit.org/236864@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426716 [details].
Comment 11 Chris Dumez 2021-04-21 19:30:48 PDT
One of the last minute changes I made to fix a layout test must have messed thing up because this patch wasn't a progression when it landed. I had tested the earlier version of my patch and it was a progression so I will have to investigate tomorrow.
Comment 12 Chris Dumez 2021-04-22 08:16:25 PDT
(In reply to Chris Dumez from comment #11)
> One of the last minute changes I made to fix a layout test must have messed
> thing up because this patch wasn't a progression when it landed. I had
> tested the earlier version of my patch and it was a progression so I will
> have to investigate tomorrow.

Looking deeper into A/B testing for this latest patch, I see that it did what I expected it to do. With the patch, there is no GPUProcess on amazon.com-front & amazon.com-search. Before the patch, there was a GPUProcess *before* the memory warning on both these pages. A/B testing indicates we get a ~1% progression (with 98% probability) on both of these pages. However, it doesn't seem this is sufficient to show a progression on the overall score (despite no other page regressing).
Comment 13 Ling Ho 2021-04-22 16:16:21 PDT
<rdar://76977801>