[Webkit-unassigned] [Bug 216208] Move all remaining flags from ElementRareData to Node to reduce the frequency
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 4 17:50:03 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=216208
--- Comment #1 from Ryosuke Niwa <rniwa at webkit.org> ---
We can also dramatically reduce the frequency of the creation of ElementRareData when tabIndex is set if we just special case 0 and -1. I've done some study on various poplar websites, and they also almost use 0 and -1 as follows:
d = {}; document.querySelectorAll('[tabindex]').forEach((e) => { if (e.tabIndex in d) d[e.tabIndex]++; else d[e.tabIndex]=0; });
Gmail
{0: 176, -1: 1300} = $5
Slack
{0: 4, 1: 0, -1: 130} =
Facebook
{0: 151, -1: 12}
Twitter
{0: 31}
Quip
{0: 53}
CNN
{0: 7, -1: 10}
NYTimes
{0: 1, 99: 0, 100: 0, -1: 0}
YouTube
{0: 59, -1: 186}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200905/14a7a4c2/attachment.htm>
More information about the webkit-unassigned
mailing list