aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/table/mod.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2025-04-24 08:01:51 -0400
committerGitHub <noreply@github.com>2025-04-24 12:01:51 +0000
commit878d5950354e3707854f94a409caa99d9ea6ebf8 (patch)
tree804018b1329fb579d70d36f7c4cd0a63050e9bba /components/layout/table/mod.rs
parent9dc56d420fdcd18d5dfd7bfec6e641f1e224c513 (diff)
downloadservo-878d5950354e3707854f94a409caa99d9ea6ebf8.tar.gz
servo-878d5950354e3707854f94a409caa99d9ea6ebf8.zip
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>
Diffstat (limited to 'components/layout/table/mod.rs')
-rw-r--r--components/layout/table/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/components/layout/table/mod.rs b/components/layout/table/mod.rs
index 120270fc7cf..fe7f90437b8 100644
--- a/components/layout/table/mod.rs
+++ b/components/layout/table/mod.rs
@@ -346,6 +346,7 @@ pub(crate) struct TableLayoutStyle<'a> {
/// Table parts that are stored in the DOM. This is used in order to map from
/// the DOM to the box tree and will eventually be important for incremental
/// layout.
+#[derive(MallocSizeOf)]
pub(crate) enum TableLevelBox {
Caption(ArcRefCell<TableCaption>),
Cell(ArcRefCell<TableSlotCell>),