3 ms·
> Are multiple cores being used to draw a webpage? Yes. There is coarse-grained parallelism (e.g. script, layout, painting can all happen simultaneously) and f
by pcwalton 12y ago
> Are multiple cores being used to draw a webpage?
Yes. There is coarse-grained parallelism (e.g. script, layout, painting can all happen simultaneously) and fine-grained parallelism (e.g. every render object is restyled and laid out concurrently).
> If so, do typical webpages need this level of performance for a satisfactory user experience?
It depends on the site, of course, but preliminary results show that multicore style recalc and layout result in large improvements in many areas that feel slow today. Examples are loading new items on "infinite-scroll" pages and CSS transitions that require layout (e.g. "top", "left", "margin-right"). In particular, Web developers frequently write animations that require layout, so large improvements there have the potential to benefit apps a lot.
- smtucker 12y agoDo you know of any resources that go in depth into how different layouts affect parallelism?
- pcwalton 12y agoI have a blog post from last year on the topic: http://pcwalton.github.io/blog/2014/02/25/revamped-parallel-layout-in-servo/ http://pcwalton.github.io/blog/2014/02/25/revamped-parallel-...
- haberman 12y agoIt would be extremely interesting to see any numbers that compare single-core layout (in Servo) with multi-core layout (in Servo).
- kibwen 12y agoHere's a draft of an experience report regarding Servo that was submitted to this year's ICFP: http://kmcallister.github.io/papers/2015-servo-experience-report-draft1.pdf http://kmcallister.github.io/papers/2015-servo-experience-re... Table 1 seems to give some relevant data: Site | Gecko | Servo 1 thread | Servo 4 threads ------------------------------------------------- Reddit | 250 | 100 | 55 CNN | 105 | 50 | 35 Table 1. Performance of Servo against Mozilla's Gecko rendering engine on the layout portion of some common sites. Times are in milliseconds, where lower numbers are better. Given the promising numbers here, I feel like the following bold quote from a Servo-related job opening at Mozilla is relevant: "Our goal is nothing less than building the fastest and most secure browser engine, and we aim to succeed by miles, not inches. We aim for double the performance of current engines, with no crashes." http://careers.mozilla.org/en-US/position/ollA0fw0 http://careers.mozilla.org/en-US/position/ollA0fw0
- nostrademons 12y agoIt would be interesting if Servo could get layout time under the frame budget on mobile devices. Right now, the divide is basically "Do whatever you want on desktop, but don't touch the DOM or use any CSS property other than transform/opacity in a mobile animation" - and it misses the mark by a large margin, eg. layout on a reasonably complicated site like Google Search is on the order of 100-150ms while the frame budget is 17ms. If you could get layout on mobile to run in under, say, 10ms, it would dramatically change what web developers can do in an animation, which would potentially also change the native vs. web technology equation.
- gavinpc 12y agoIt's all about "butter" vs "stutter". And as a Firefox fanboy, I'm sad to report that Firefox is on the latter end of the continuum. What you describe is my experience exactly -- except that it's not quite limited to mobile. I do all my primary development against Firefox. I'm content to optimize for Gecko, and I've learned what it handles well and what it doesn't [0]. In cases where I've really doubled down to optimize some transitions, I can get almost-butter from Firefox, where Chrome and Safari are pure pleasure, seemingly no matter what I throw at them. Hell, even IE 11 is better when it comes to transitions. That said, I think Gecko looks the most beautiful for static rendering. This is less true since Chrome 38, which supports proper web font rendering for Windows, but I'll maintain that Gecko's compositor output still has a certain je ne sais quoi compared to everything else. Still, as a developer who "wants the web to win," [1] it's troubling to me that the vendors with native platforms are still outperforming in the browser space, and I hope that Servo is the dark horse that will change all that. [0] For instance, I've read this thread one too many times: https://bugzilla.mozilla.org/show_bug.cgi?id=524925 https://bugzilla.mozilla.org/show_bug.cgi?id=524925 [1] Quoting http://jlongster.com/Radical-Statements-about-the-Mobile-Web http://jlongster.com/Radical-Statements-about-the-Mobile-Web
- TwoBit 12y agoI've noticed the Gecko vs WebKit rendering difference as well. I never bothered to look into exactly what it was.