mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +01:00
Back out https://github.com/servo/servo/pull/17198 for Gecko test failures
This commit is contained in:
parent
bf46da065d
commit
3d3ce51797
2 changed files with 6 additions and 10 deletions
|
@ -37,11 +37,9 @@ use traversal::{DomTraversal, PerLevelTraversalData, PreTraverseToken};
|
||||||
///
|
///
|
||||||
/// Larger values will increase style sharing cache hits and general DOM locality
|
/// Larger values will increase style sharing cache hits and general DOM locality
|
||||||
/// at the expense of decreased opportunities for parallelism. The style sharing
|
/// 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
|
/// cache can hold 8 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
|
/// value to 16. These values have not been measured and could potentially be
|
||||||
/// sharing on a few pages, but could probably use more measurement and tuning.
|
/// tuned.
|
||||||
/// The work unit size is a bit of a guess at the moment; again could use
|
|
||||||
/// measurement and tuning.
|
|
||||||
pub const WORK_UNIT_MAX: usize = 16;
|
pub const WORK_UNIT_MAX: usize = 16;
|
||||||
|
|
||||||
/// Verify that the style sharing cache size doesn't change. If it does, we should
|
/// 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.
|
/// have surprising effects on the parallelism characteristics of the style system.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
fn static_assert() {
|
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.
|
/// A list of node pointers.
|
||||||
|
|
|
@ -84,10 +84,8 @@ use stylist::{ApplicableDeclarationBlock, Stylist};
|
||||||
mod checks;
|
mod checks;
|
||||||
|
|
||||||
/// The amount of nodes that the style sharing candidate cache should hold at
|
/// 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
|
/// most.
|
||||||
/// store sizes. A cache size of 32 would mean a backing store of 33, but
|
pub const STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 8;
|
||||||
/// that's not an implemented size: we can do 32 or 40.
|
|
||||||
pub const STYLE_SHARING_CANDIDATE_CACHE_SIZE: usize = 31;
|
|
||||||
|
|
||||||
/// Controls whether the style sharing cache is used.
|
/// Controls whether the style sharing cache is used.
|
||||||
#[derive(Clone, Copy, PartialEq)]
|
#[derive(Clone, Copy, PartialEq)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue