Skip to content
Lars Bergstrom edited this page Jul 10, 2015 · 2 revisions

Servo Meeting 2015-07-06

Vidyo links:

Reminder: use http://benjamin.smedbergs.us/weekly-updates.fcgi/

Agenda items

  • Reviewable performance update (larsberg)
  • Benchmarking "DOM thrashing pattern" (larsberg)
  • Expanding the Rust & Servo training (larsberg)

Attending

  • cimes, gw, jdm, laleh, larsberg, mbrubeck, samsung, pcwalton

Last weeks in Servo

  • There were 63 commits the week of June 21st (no meeting held) and 42 the week of June 28th!

Reviewable

  • larsberg: They landed a ton of fixes for us. They spent almost a week just optimizing based on our SMup PR. If you still see any performance issues, let me know. They've been really responsive.

Benchmarking

  • larsberg: Paul Irish from the Chrome team dropped by this weekend to ask what we're doing about DOM thrashing - things that rapidly write and read a DOM variable in sequence. I was wondering if there are any benchmarks we can use to measure whether parallelism helps that kind of stuff.
  • pcwalton: Are we talking about setting a layout property and then reading it back? Or like letting textContent and then reading textContent?
  • larsberg: his example:
5:46 PM <paul_iri_> if script does the classic thrashing pattern like:
5:46 PM <paul_iri_> var height1 = elem.offsetHeight; elem.style.height = x; 
5:46 PM <paul_iri_> var height2 = elem.offsetHeight; elem.style.height = y; 
5:46 PM <paul_iri_> is there anything you can do about that?
5:46 PM <paul_iri_> it's basically the modern day document.write :)
  • jdm: I remember roc was concerned about this a couple years ago when we last talked about it.
  • pcwalton: Yeah, this is like the worst case for us.
  • jdm: Could this be helped by doing partial layout, being able to interrupt it and return without having to lay out the rest of the page?
  • pcwalton: The short answer is yes. It's not that difficult to implement it, maybe even easier in Servo than other engines because we can just modify the driver to restrict itself to subsets of trees. But this is a qualified yes, because we can't do that with all properties. Something like offsetHeight, you can determine just by laying out your descendants. That's nice but it's specific to height. For width it's something else; for offsetLeft or offsetTop it's something else again. So you need to add a bunch of different paths. It's like incremental layout; you need to think carefully about each property that you support. It works if you can throw a lot of people at it. I don't know of any holistic way to do it, which is why I'm kind of lukewarm about it. I think Servo is an excellent foundation if you want to do it. Because in theory we can just modify the traversal function to avoid things we don't care about. One possible brute force solution I thought of is to take advantage of parallelism to do a full-document reflow, but the moment you've computed the thing you want, stop layout and return it. That wouldn't require a whole bunch of hacks. It wouldn't be optimal, because you compute things that you don't necessarily need to compute. But it is an intriguing idea that doesn't seem to require a bunch of work.
  • larsberg: This is also exactly the scenario the folks at Maryland are looking at, with incremental computation. Just fitting incremental computation into Rust has been about six months of work, but now that it's running maybe I can convince them to try a few experiments.
  • larsberg: Are there any benchmarks you're aware of that hammer on this stuff?
  • pcwalton: This is the general problem of, are there any layout benchmarks at all (that aren't really stupid)? Probably the closest one is RoboHornet. I'm not sure Paul Irish is maintaining it anymore. Layout benchmarks in things like Peacekeeper aren't really testing incremental layout meaningfully as far as I know. I could be wrong, though.

Rust and Servo Training

  • larsberg: I'm planning on expanding the material from Whistler with more material and exercises. The Samsung OSG folks have offered to provide from help. If you have any ideas of things we could cover in Servo, let me know. The mouseover one was great but it'll be stale as soon as we land the fix in our repo.
Clone this wiki locally