mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
script: Measure stored layout data memory usage. (#36664)
We previously ignored the opaque layout data field inside each node when measuring a DOM node's memory usage. While some of the reachable memory was accounted for by measuring the layout's box tree, measuring it via the node ensures that we don't miss anything. Since there are often Arc values involved, this means that the layout-thread box tree measurements now look quite small, while reported JS heap usage has increased. Testing: Manually compared about:memory for servo.org. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
9dc56d420f
commit
878d595035
7 changed files with 34 additions and 14 deletions
|
@ -25,11 +25,11 @@ use style::selector_parser::{PseudoElement, PseudoElementCascadeType, SelectorIm
|
|||
use style::stylist::RuleInclusion;
|
||||
|
||||
use crate::{
|
||||
FragmentType, GenericLayoutData, HTMLCanvasData, HTMLMediaData, LayoutNodeType, SVGSVGData,
|
||||
StyleData,
|
||||
FragmentType, GenericLayoutData, GenericLayoutDataTrait, HTMLCanvasData, HTMLMediaData,
|
||||
LayoutNodeType, SVGSVGData, StyleData,
|
||||
};
|
||||
|
||||
pub trait LayoutDataTrait: Default + Send + Sync + 'static {}
|
||||
pub trait LayoutDataTrait: GenericLayoutDataTrait + Default + Send + Sync + 'static {}
|
||||
|
||||
/// A wrapper so that layout can access only the methods that it should have access to. Layout must
|
||||
/// only ever see these and must never see instances of `LayoutDom`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue