diff options
author | Boris Zbarsky <bzbarsky@mit.edu> | 2017-06-08 12:38:57 -0400 |
---|---|---|
committer | Boris Zbarsky <bzbarsky@mit.edu> | 2017-06-08 14:14:44 -0400 |
commit | 2f2b93c52143b9fe6110b52056c27b83ca671f1e (patch) | |
tree | d75b09f6c85cb36e2b04ca3a95b612e7a3d94b21 /components/style/parallel.rs | |
parent | 93271e199b8b7f6ec20d1546b384ea7ab9155759 (diff) | |
download | servo-2f2b93c52143b9fe6110b52056c27b83ca671f1e.tar.gz servo-2f2b93c52143b9fe6110b52056c27b83ca671f1e.zip |
Increase the size of the style sharing cache to 31.
Still a lot of guesswork here, but this does seem to get us better sharing. See
https://bugzilla.mozilla.org/show_bug.cgi?id=1369621 for some data.
Diffstat (limited to 'components/style/parallel.rs')
-rw-r--r-- | components/style/parallel.rs | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/components/style/parallel.rs b/components/style/parallel.rs index fecdff844a6..0af6eed469c 100644 --- a/components/style/parallel.rs +++ b/components/style/parallel.rs @@ -26,7 +26,6 @@ use context::TraversalStatistics; use dom::{OpaqueNode, SendNode, TElement, TNode}; use rayon; use scoped_tls::ScopedTLS; -use sharing::STYLE_SHARING_CANDIDATE_CACHE_SIZE; use smallvec::SmallVec; use std::borrow::Borrow; use std::mem; @@ -36,21 +35,10 @@ use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken}; /// The maximum number of child nodes that we will process as a single unit. /// /// 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 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. +/// at the expense of decreased opportunities for parallelism. This value has 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 -/// reconsider the above. We do this, rather than defining WORK_UNIT_MAX in terms -/// of STYLE_SHARING_CANDIDATE_CACHE_SIZE, so that altering the latter doesn't -/// 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; 8]); } -} - /// A list of node pointers. /// /// Note that the inline storage doesn't need to be sized to WORK_UNIT_MAX, but |