Bug 232883

Summary: [Performance test][css-contain] Add case to test contain: layout inside a complex document
Product: WebKit Reporter: cathiechen <cathiechen>
Component: CSSAssignee: cathiechen <cathiechen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, ews-watchlist, jbedard, rbuis, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=228696
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description cathiechen 2021-11-09 07:25:32 PST
Add case to test contain: layout inside a complex document
Comment 1 cathiechen 2021-11-09 07:36:48 PST
Created attachment 443689 [details]
Patch
Comment 2 cathiechen 2021-11-09 07:44:04 PST
Tested locally, here are the results:

Disable CSS containment:

:Runs -> [4.232804232804235, 4.282655246252677, 4.3478260869565215, 4.333694474539545, 4.32432432432432, 4.287245444801715, 4.34782608695653, 4.381161007667032, 4.395604395604404, 4.504504504504505, 4.489337822671156, 4.405286343612326, 3.7735849056603774, 3.712871287128713, 3.65853658536587, 3.7174721189591247, 3.7406483790523692, 3.7735849056603774, 4.415011037527594, 4.405286343612334] runs/s
    mean: 4.176463276683085 runs/s
    median: 4.329009399431932 runs/s
    stdev: 0.30757834250293725 runs/s
    min: 3.65853658536587 runs/s
    max: 4.504504504504505 runs/s
    
Enable CSS containment:

:Runs -> [290.6208718626154, 318.7250996015938, 322.5806451612903, 307.29833546734955, 315.37450722733246, 315.37450722733246, 304.56852791878174, 306.51340996168585, 306.9053708439898, 311.68831168831167, 303.4134007585335, 303.03030303030374, 311.284046692607, 317.04095112285336, 312.09362808842656, 308.0872913992298, 307.6923076923077, 320.1970443349754, 303.4134007585335, 323.3830845771144] runs/s
    mean: 310.4642522707584 runs/s
    median: 309.6856690459184 runs/s
    stdev: 7.973029662425939 runs/s
    min: 290.6208718626154 runs/s
    max: 323.3830845771144 runs/s
Comment 3 Rob Buis 2021-11-09 08:08:47 PST
ASAN Release build (2021 MacBook Pro M1):

Disable CSS containment:

:Runs -> [11.350737797956867, 11.235955056179776, 11.312217194570136, 11.299435028248588, 11.325028312570781, 11.325028312570781, 11.325028312570781, 11.286681715575622, 11.26126126126126, 11.26126126126126, 11.037527593818984, 11.185682326621901, 11.160714285714308, 11.36363636363634, 11.325028312570758, 11.123470522803114, 11.299435028248565, 11.1731843575419, 11.235955056179776, 11.160714285714286] runs/s
    mean: 11.252399119280788 runs/s
    median: 11.273971488418441 runs/s
    stdev: 0.08686076045574032 runs/s
    min: 11.037527593818984 runs/s
    max: 11.36363636363634 runs/s

Enable CSS containment:

:Runs -> [1055.4089709762534, 1061.0079575596817, 1062.4169986719787, 1069.258809234508, 1028.2776349614396, 1054.0184453227932, 1059.6026490066224, 1061.0079575596817, 1062.41699867198, 1063.8297872340424, 1044.3864229765013, 1063.8297872340424, 1062.4169986719787, 1058.2010582010582, 1038.9610389610389, 1062.4169986719787, 1062.4169986719787, 1043.0247718383312, 1062.4169986719787, 1066.6666666666667] runs/s
    mean: 1057.0991974882265 runs/s
    median: 1061.7124781158302 runs/s
    stdev: 10.436357976932406 runs/s
    min: 1028.2776349614396 runs/s
    max: 1069.258809234508 runs/s
Comment 4 Radar WebKit Bug Importer 2021-11-16 07:26:20 PST
<rdar://problem/85457367>
Comment 5 cathiechen 2021-11-19 03:33:32 PST
Created attachment 444798 [details]
Patch
Comment 6 cathiechen 2021-11-19 04:49:07 PST
Created attachment 444802 [details]
Patch
Comment 7 Rob Buis 2021-11-19 04:58:10 PST
Comment on attachment 444802 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444802&action=review

> PerformanceTests/Layout/css-contain-layout-size-inside-complex-document.html:74
> +            description: 'Measures performance of changing layout containment box inside a document with complicated and expensive layout.',

This probably needs changing too.
Comment 8 cathiechen 2021-11-19 05:20:48 PST
Comment on attachment 444802 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=444802&action=review

Thanks for the review, Rob!

>> PerformanceTests/Layout/css-contain-layout-size-inside-complex-document.html:74
>> +            description: 'Measures performance of changing layout containment box inside a document with complicated and expensive layout.',
> 
> This probably needs changing too.

Oops, done! Thanks!
Comment 9 cathiechen 2021-11-19 05:24:21 PST
Created attachment 444806 [details]
Patch
Comment 10 cathiechen 2021-11-21 18:32:25 PST
Created attachment 444934 [details]
Patch
Comment 11 EWS 2021-11-21 19:06:39 PST
Committed r286108 (244495@main): <https://commits.webkit.org/244495@main>

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