The web browser is a CPU-intensive program. Especially on mobile devices, loading of webpages is too slow, spending much of its time in processing a document's appearance. Due to power constraints, most hardware improvements will come in the form of parallel architectures. This is also true of mobile devices such as phones. Current browsers, however, do not yet fully exploit hardware parallelism, so we are designing a parallel mobile browser. In this paper, we introduce new algorithms for CSS selector matching, layout solving, and font rendering, which represent key components for a fast layout engine. Evaluation on popular sites shows speedups as high as 80x. We also formulate layout solving with attribute grammars, enabling us to not only parallelize our algorithm but prove that it computes in O(log) time and without reflow.Irrespective of how you feel about our solution, the intro benchmark section surprises most people I talk to about what's actually slow in browsers. Below are basic CPU times and then (not included in the paper) JavaScript times when loading some popular pages. You might suspect that these are not representative of running pages; I found that harder to benchmark, but at least in cases of animations (e.g., loading emails), it's actually still true. Finally, keep in mind handhelds are and will be ~10x+ slower than laptops: 200ms on the laptop used below is 2s+ on a handheld.
Overall CPU task time (ms) when loading a page.
As a disclaimer (and solicitation for input!) the paper is still in draft form. Enjoy!
No comments:
Post a Comment