Hi everyone,

I have a preliminary parallel-layout branch here:

https://github.com/pcwalton/servo/tree/parallel-layout

Currently it only runs bubble-widths (computation of minimum and preferred widths) in parallel, and some things (such as text) are turned off due to not being thread-safe yet. (They use @ boxes, so I need to clean them up before this can land.) In the meantime I have some preliminary numbers on `perf-rainbow.html` in the tests directory (a page full of nested divs). Tested on a 4-way HyperThreaded 2.7 GHz Core i7 with 6 worker threads:

Sequential bubble-widths: mean 29.01ms, median 32.58ms
Parallel bubble-widths: mean 16.14ms, median 17.53ms
- Parallel portion: mean 13.47ms, median 14.59ms
- Sequential warmup portion: mean 2.67ms, median 2.94ms

The median parallel bubble-widths is 86% faster than the sequential bubble-widths. Also, I believe these numbers are reasonably realistic, because our reflow traversals are already comparable to Gecko, WebKit, and Blink in sequential performance. Thus this represents a significant speedup over the current state of the art, if these numbers are accurate.

Keep in mind that these numbers are very preliminary and are *highly* subject to change. They could well be entirely wrong, so please don't read too much into them.

On very small pages (where reflow is < 1 ms) the overhead swamps these parallel traversals and I observed 10x slowdowns. However, I'm not too concerned about these pages because if reflow is less than 1 ms we will usually not have much trouble hitting 60 FPS anyhow. We can back off to sequential for those cases with the same code. (This is the advantage of our "kernel function" approach.)

Patrick
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to