From 7897e86bccc1e6f510b28bc40ea1700029f41b5d Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 16 Jul 2025 11:54:43 +0200 Subject: [PATCH] Restore timing scopes for native show rules (#6616) --- crates/typst-realize/src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crates/typst-realize/src/lib.rs b/crates/typst-realize/src/lib.rs index 87df940e4..f3f071505 100644 --- a/crates/typst-realize/src/lib.rs +++ b/crates/typst-realize/src/lib.rs @@ -374,9 +374,11 @@ fn visit_show_rules<'a>( } // Apply a built-in show rule. - ShowStep::Builtin(rule) => rule - .apply(&output, s.engine, chained) - .map(|content| content.spanned(output.span())), + ShowStep::Builtin(rule) => { + let _scope = typst_timing::TimingScope::new(output.elem().name()); + rule.apply(&output, s.engine, chained) + .map(|content| content.spanned(output.span())) + } }; // Errors in show rules don't terminate compilation immediately. We just