| Summary: | Prototype streaming for declarative shadow DOM | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
| Component: | DOM | Assignee: | Ryosuke Niwa <rniwa> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=245556 | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 148695 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ryosuke Niwa
2022-09-29 00:28:38 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4822 Committed 255020@main (c0bda7319ffb): <https://commits.webkit.org/255020@main> Reviewed commits have been landed. Closing PR #4822 and removing active labels. Created attachment 462782 [details]
perf test
Using the attached performance test, I've observed the following numbers on my 14" M1 Max MacBookPro.
First, using polyfill for declarative shadow DOM, we observe that:
:Time -> [221, 210.0000000000001, 210, 218, 215, 218.99999999999977, 217.99999999999977, 233, 214, 208, 218, 232, 206, 210, 204.00000000000045, 207.00000000000045, 227, 192, 205, 215] ms
mean: 214.1 ms
median: 214.5 ms
stdev: 9.840303803611327 ms
min: 192 ms
max: 233 ms
Using native declarative shadow DOM without streaming (i.e. same as Blink's implementation), we observe that:
:Time -> [163, 174, 198, 158, 157, 157.00000000000023, 158, 180, 157, 156, 158, 168, 159, 162.00000000000045, 158.00000000000045, 158, 169, 158.00000000000045, 160, 163.00000000000045] ms
mean: 163.5500000000001 ms
median: 158.50000000000023 ms
stdev: 10.318481120377072 ms
min: 156 ms
max: 198 ms
This mean is 23.6% faster than polyfill.
Finally, using native declarative shadow DOM with streaming (i.e. shadow root is attached at the start tag instead of the end tag), we observe that:
:Time -> [142, 152.00000000000006, 167.99999999999994, 150, 142.0000000000001, 144.9999999999999, 177, 155, 147, 166, 144, 142, 142, 147, 185, 142, 143, 162.99999999999955, 141, 143] ms
mean: 151.8 ms
median: 145.99999999999994 ms
stdev: 13.069047402163593 ms
min: 141 ms
max: 185 ms
This mean is 29.1% faster than polyfill and 7% faster than non-streaming version.
Created attachment 462783 [details]
standalone perf test
|