From c787688afc873e78d9526809cf7d2cde689c0ae4 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 18 Apr 2025 16:05:15 -0400 Subject: layout: Report memory usage for fragment and box trees. (#36553) Add memory reporter integration for the fragment and box trees that are persisted in the layout thread. Testing: Looked at the numbers for https://servo.org and https://html.spec.whatwg.org/. The former was very small, but the latter was 700mb. --------- Signed-off-by: Josh Matthews --- components/fonts/glyph.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'components/fonts/glyph.rs') diff --git a/components/fonts/glyph.rs b/components/fonts/glyph.rs index e0e85ed7f74..db97ee0ebee 100644 --- a/components/fonts/glyph.rs +++ b/components/fonts/glyph.rs @@ -741,9 +741,10 @@ impl fmt::Debug for GlyphStore { } /// A single series of glyphs within a text run. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)] pub struct GlyphRun { /// The glyphs. + #[conditional_malloc_size_of] pub glyph_store: Arc, /// The byte range of characters in the containing run. pub range: Range, -- cgit v1.2.3