Bug 231184

Summary: Sandbox complexity and performance improvements
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit2Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, eric.carlson, kkinnunen, pvollan, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Brent Fulgham 2021-10-04 11:44:53 PDT
The Sandbox team suggested a number of improvements to our sandbox:

1. Minimize regex usage
Better to use enumerate individual names than grouping similar names into regexes. This is a performance improvement.

2. Remove duplicate rules

3. Remove 'defined?' checks for the many things that are supported in all WebKit target OSes.

These will simplify the rules, and should provide some launch time improvement.
Comment 1 Brent Fulgham 2021-10-04 11:45:14 PDT
<rdar://problem/47565664>
Comment 2 Brent Fulgham 2021-10-04 11:49:31 PDT
Created attachment 440083 [details]
Patch
Comment 3 Brent Fulgham 2021-10-04 15:01:40 PDT
Tested on macOS and iOS on device (including streaming video).
Comment 4 Per Arne Vollan 2021-10-12 08:42:32 PDT
Comment on attachment 440083 [details]
Patch

R=me.
Comment 5 Per Arne Vollan 2021-10-12 08:45:38 PDT
Comment on attachment 440083 [details]
Patch

Should we also start collecting telemetry for the properties seldom seen? There might be many obsolete properties by now. That falls outside the scope of this patch, however.
Comment 6 EWS 2021-10-12 09:27:55 PDT
Tools/Scripts/svn-apply failed to apply attachment 440083 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Comment 7 Brent Fulgham 2021-10-12 10:34:54 PDT
Created attachment 440956 [details]
Patch for landing
Comment 8 EWS 2021-10-12 12:03:20 PDT
Committed r283998 (242842@main): <https://commits.webkit.org/242842@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440956 [details].