Remove leaf sets #1700

Merged
merged 5 commits into from Feb 25, 2014

Projects

None yet

4 participants

@pcwalton

cc @pradeep90 — This removes leaf sets and should be enough to get you started.

This series of patches combines various layout passes to eliminate the overhead involved with bottom-up passes. It also makes assign-widths and flow construction run in parallel. No raw layout code was touched (except in trivial ways); rather this just changes the way methods are invoked. So the overall level of code cleanliness should remain the same. In fact, this is a (slight) net loss in LOC, and should be an improvement in safety due to not having to ensure that the nodes in the leaf sets stay alive!

This was quite a nice speedup; we're now 38% faster than Blink sequentially for style recalc on the rainbow page and 2.56x faster with 4 cores. (The relatively low speedup is because the LRU cache hits perfectly on that page sequentially.)

There is a data race somewhere in the unsafe code I added, so do not merge yet.

@highfive

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify layout code, but no reftests are modified. Please consider adding a reftest!
  • @pcwalton, please confirm that src/test/html/acid1.html and your favourite wikipedia page still render correctly!
@pcwalton

The data races were unrelated to this PR (and aren't actually races, just bugs). I think everything is OK now.

r? @kmcallister

@pcwalton

Addressed comment. r? @kmcallister

@kmcallister

Needs rebase.

@pcwalton

r=kmcallister

saw approval from kmcallister
at pcwalton@f699ca9

merging pcwalton/servo/deleafset = f699ca9 into auto

pcwalton/servo/deleafset = f699ca9 merged ok, testing candidate = da16e54

fast-forwarding master to auto = da16e54

@bors-servo bors-servo pushed a commit that referenced this pull request Feb 25, 2014
bors-servo auto merge of #1700 : pcwalton/servo/deleafset, r=kmcallister
cc @pradeep90 — This removes leaf sets and should be enough to get you started.

This series of patches combines various layout passes to eliminate the overhead involved with bottom-up passes. It also makes assign-widths and flow construction run in parallel. No raw layout code was touched (except in trivial ways); rather this just changes the way methods are invoked. So the overall level of code cleanliness should remain the same. In fact, this is a (slight) net loss in LOC, and should be an improvement in safety due to not having to ensure that the nodes in the leaf sets stay alive!

This was quite a nice speedup; we're now 38% faster than Blink sequentially for style recalc on the rainbow page and 2.56x faster with 4 cores. (The relatively low speedup is because the LRU cache hits perfectly on that page sequentially.)

There is a data race somewhere in the unsafe code I added, so *do not merge yet*.
da16e54
@bors-servo bors-servo merged commit f699ca9 into servo:master Feb 25, 2014

1 check passed

default all tests passed
@pcwalton pcwalton deleted the pcwalton:deleafset branch Feb 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment