RESOLVED FIXED 110408
Tune BackgroundHTMLParser's pendingTokenLimit based on a benchmark
https://bugs.webkit.org/show_bug.cgi?id=110408
Summary Tune BackgroundHTMLParser's pendingTokenLimit based on a benchmark
Tony Gentilcore
Reported 2013-02-20 16:49:44 PST
I ran the threaded HTML parser in Telemetry against the top 25 sites on a Nexus 7 with a variety of pendingTokenLimits ranging from 250-6000 (current == 4000). My observations: - The threaded HTML parser improves by DOMContentLoaded 8-14% and total time spent parsing on main thread by 9-13% - Varying pendingTokenLimit doesn't significantly change total time spent parsing on main thread, DOMContentLoaded or Load - Tweaking pendingTokenLimit can improve maximum time spent parsing on main thread by another 40% I recommend we change it from 4000 to 1000. Results: https://docs.google.com/a/chromium.org/spreadsheet/ccc?key=0AmVDuVhIZxCTdEstXy02NXZnNE5wb0d4NTlPNGQ2U1E#gid=1
Attachments
Patch (1.87 KB, patch)
2013-02-21 11:08 PST, Tony Gentilcore
no flags
Eric Seidel (no email)
Comment 1 2013-02-20 17:07:09 PST
Discussed with Tony in person. I'm worried that but 109995 could be throwing off our perf numbers, and we should probably wait to do final testing for this change until after bug 109995 is resolved. It would also be nice to see numbers for the "yield every 10 tokens" case, just to verify that it throws out our "total parse time" (or one of our metrics) by an expectedly large number. I worry our current inspector-based testing doesn't account for the overhead this contant is trying to avoid. :)
Tony Gentilcore
Comment 2 2013-02-21 11:00:46 PST
I ran with pendingTokenLimit=10 and updated the spreadsheet. Both total parse time and DOMContentLoaded markedly regressed.
Tony Gentilcore
Comment 3 2013-02-21 11:08:15 PST
Adam Barth
Comment 4 2013-02-21 12:10:46 PST
Comment on attachment 189560 [details] Patch This patch seems harmless. We might want to tune again when we're closer to turning the threaded parser on by default.
WebKit Review Bot
Comment 5 2013-02-21 13:48:10 PST
Comment on attachment 189560 [details] Patch Clearing flags on attachment: 189560 Committed r143649: <http://trac.webkit.org/changeset/143649>
WebKit Review Bot
Comment 6 2013-02-21 13:48:14 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.