Boris Zbarsky wrote:
On 5/19/13 10:38 PM, Patrick Walton wrote:
I did a very quick microbenchmark of Servo's "hard case" for layout
using the HTML document attached and came up with about 47 microseconds
per layout in Gecko. So these early results seem promising; 2
microseconds does not seem significant in comparison.
Thank you for doing that!
Yes, well-done, Patrick.
For cases that need layout, you're right: 2us is quite reasonable in
terms of overhead. That's awesome.
We can do even better with the L4 microkernel idea of nesting the other
task's work on the current task instead of sending a message, when doing
so is safe (pure optimization, not observable except via better perf).
The other case we need to be able to do fast is when no layout is
needed; just layout information computed from existing data
structures. So things like the testcase in
https://bug709256.bugzilla.mozilla.org/attachment.cgi?id=580520 or the
testcase you were testing but with the style.top set removed.
Good point. This reminds me of the OMTC/A de-facto standard from iOS
WebKit. Is anyone in W3C or WHATWG writing any of this "no relayout, can
optimize or move to compositor thread" magic?
The key for Gecko in those situations has been to very quickly
determine that layout is not needed and then just grab the layout data
from the frame tree. The times for that are order of tens of ns, last
I checked, so we'd need to be able to do this without a task switch.
Does that seem feasible?
Yes, via the L4 microkernel idea.
/be
_______________________________________________
dev-servo mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-servo