diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-06-07 13:50:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-07 13:50:54 -0700 |
commit | 3553ae4df97092a2c909d8bd104ece4d6a211ce3 (patch) | |
tree | 414f8d24230473ef60ae658d639ada316bdb4237 | |
parent | 0934df77fdbddcb6ae1534e3c1a150272aea73b2 (diff) | |
parent | 3d3ce51797a1fae1d6de9bb4bd3adea94fd95a04 (diff) | |
download | servo-3553ae4df97092a2c909d8bd104ece4d6a211ce3.tar.gz servo-3553ae4df97092a2c909d8bd104ece4d6a211ce3.zip |
Auto merge of #17214 - bzbarsky:backout-style-sharing-increase, r=bustage
Back out https://github.com/servo/servo/pull/17198 for Gecko test failures
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17214)
<!-- Reviewable:end -->
-rw-r--r-- | components/style/parallel.rs | 10 | ||||
-rw-r--r-- | components/style/sharing/mod.rs | 6 |
2 files changed, 6 insertions, 10 deletions
diff --git a/components/style/parallel.rs b/components/style/parallel.rs index fe6bceb4da1..859548d3c8b 100644 --- a/components/style/parallel.rs +++ b/components/style/parallel.rs @@ -37,11 +37,9 @@ use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken}; /// /// Larger values will increase style sharing cache hits and general DOM locality /// at the expense of decreased opportunities for parallelism. The style sharing -/// cache can hold 31 entries, but not all styles are shareable, so we set this -/// value to 16. The size of the cache has been measured to provide pretty good -/// sharing on a few pages, but could probably use more measurement and tuning. -/// The work unit size is a bit of a guess at the moment; again could use -/// measurement and tuning. +/// cache can hold 8 entries, but not all styles are shareable, so we set this +/// value to 16. These values have not been measured and could potentially be +/// tuned. pub const WORK_UNIT_MAX: usize = 16; /// Verify that the style sharing cache size doesn't change. If it does, we should @@ -50,7 +48,7 @@ pub const WORK_UNIT_MAX: usize = 16; /// have surprising effects on the parallelism characteristics of the style system. #[allow(dead_code)] fn static_assert() { - unsafe { mem::transmute::<_, [u32; STYLE_SHARING_CANDIDATE_CACHE_SIZE]>([1; 31]); } + unsafe { mem::transmute::<_, [u32; STYLE_SHARING_CANDIDATE_CACHE_SIZE]>([1; 8]); } } /// A list of node pointers. diff --git a/components/style/sharing/mod.rs b/components/style/sharing/mod.rs index 7f9b2bc32d6..f996538fb6b 100644 --- a/components/style/sharing/mod.rs +++ b/components/style/sharing/mod.rs @@ -84,10 +84,8 @@ use stylist::{ApplicableDeclarationBlock, Stylist}; mod checks; /// The amount of nodes that the style sharing candidate cache should hold at -/// most. We'd somewhat like 32, but ArrayDeque only implements certain backing -/// store sizes. A cache size of 32 would mean a backing store of 33, but -/// that's not an implemented size: we can do 32 or 40. -pub const STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 31; +/// most. +pub const STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 8; /// Controls whether the style sharing cache is used. #[derive(Clone, Copy, PartialEq)] |