Measure the UA cache.

ServoStyleSetSizes now has two uses, one for the Stylist, and one for the UA
cache, and so the patch removes 'Stylist' from the field names.

Example output from about:memory:

> +----1,359,608 B (00.55%) -- layout
> |    +----756,488 B (00.31%) -- style-sheet-cache [2]
> |    +----393,968 B (00.16%) -- servo-ua-cache
> |    |    +--234,496 B (00.10%) -- element-and-pseudos-maps
> |    |    +---59,648 B (00.02%) -- revalidation-selectors
> |    |    +---58,320 B (00.02%) -- invalidation-map
> |    |    +---30,752 B (00.01%) -- other
> |    |    +---10,752 B (00.00%) -- precomputed-pseudos
This commit is contained in:
Nicholas Nethercote 2017-09-20 08:50:21 +10:00
parent c6381c66a0
commit f7023a120e
7 changed files with 114 additions and 84 deletions

View file

@ -112,6 +112,7 @@ pub trait ElementExt: Element<Impl=SelectorImpl> + Debug {
}
/// A per-functional-pseudo map, from a given pseudo to a `T`.
#[cfg_attr(feature = "gecko", derive(MallocSizeOf))]
#[cfg_attr(feature = "servo", derive(HeapSizeOf))]
pub struct PerPseudoElementMap<T> {
entries: [Option<T>; SIMPLE_PSEUDO_COUNT],