mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1593642 - Remove obsolete logic for LRUCache size.
The LRUCache implementation has been replaced, and no longer requires a backing store larger than its capacity. Differential Revision: https://phabricator.services.mozilla.com/D51589 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1f7eca8fa7
commit
9d3176f665
@ -90,17 +90,14 @@ use uluru::{Entry, LRUCache};
|
|||||||
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
|
|
||||||
/// that's not an implemented size: we can do 32 or 40.
|
|
||||||
///
|
///
|
||||||
/// The cache size was chosen by measuring style sharing and resulting
|
/// The cache size was chosen by measuring style sharing and resulting
|
||||||
/// performance on a few pages; sizes up to about 32 were giving good sharing
|
/// performance on a few pages; sizes up to about 32 were giving good sharing
|
||||||
/// improvements (e.g. 3x fewer styles having to be resolved than at size 8) and
|
/// improvements (e.g. 3x fewer styles having to be resolved than at size 8) and
|
||||||
/// slight performance improvements. Sizes larger than 32 haven't really been
|
/// slight performance improvements. Sizes larger than 32 haven't really been
|
||||||
/// tested.
|
/// tested.
|
||||||
pub const SHARING_CACHE_SIZE: usize = 31;
|
pub const SHARING_CACHE_SIZE: usize = 32;
|
||||||
const SHARING_CACHE_BACKING_STORE_SIZE: usize = SHARING_CACHE_SIZE + 1;
|
|
||||||
|
|
||||||
/// Opaque pointer type to compare ComputedValues identities.
|
/// Opaque pointer type to compare ComputedValues identities.
|
||||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||||
@ -426,7 +423,7 @@ impl<E: TElement> StyleSharingTarget<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct SharingCacheBase<Candidate> {
|
struct SharingCacheBase<Candidate> {
|
||||||
entries: LRUCache<[Entry<Candidate>; SHARING_CACHE_BACKING_STORE_SIZE]>,
|
entries: LRUCache<[Entry<Candidate>; SHARING_CACHE_SIZE]>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Candidate> Default for SharingCacheBase<Candidate> {
|
impl<Candidate> Default for SharingCacheBase<Candidate> {
|
||||||
|
Loading…
Reference in New Issue
Block a user