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.
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."
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
[1] Quoting http://jlongster.com/Radical-Statements-about-the-Mobile-Web
It's needed because low-end phones have 8 slow cores instead of 2 fast cores.
I install Xiaomi's latest MIUI on them (and Play Store), and then resell them locally for $300 each. and people tell me they're stealing them from me at that price.
1. http://www.aliexpress.com/item/Original-lenovo-s850c-Max-4G-...
> If so, do typical webpages need this level of
> performance for a satisfactory user experience?
Servo on desktop is certainly interesting, but a primary use case is mobile devices and other devices that have multiple CPU cores that aren't very powerful individually. > draw a webpage
Drawing a webpage on your screen entails a few different primary tasks.Some things like alpha blending and animation can be offloaded to the GPU quite well and this is already being done extensively today on various mobile OSs.
Other things like layout, DOM manipulation, and scripting involve a lot of branching logic and need to be handled by the CPU. That's where Servo comes in - the goal is to better spread that stuff out across multiple CPU cores.
2-3x faster seems about right for 4 cores:
http://www.phoronix.com/scan.php?page=news_item&px=MTgzNDA
I think that was on 4 ARM cores/threads, so the increase in performance may be even bigger for 4 cores/8 thread chips.
From the PDF link it also seems that if the 4 cores work "at the same performance" level as 1 core, power consumption can drop down to 40% (page 23).
https://events.linuxfoundation.org/sites/events/files/slides...