From 5df550f8e8cf60940f1a9c741e4663fbfd636ba3 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 13 Sep 2023 15:43:18 +0200 Subject: [PATCH] Memoize plugin invocations --- crates/typst/src/eval/plugin.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/typst/src/eval/plugin.rs b/crates/typst/src/eval/plugin.rs index 29ca79c0e..11576080e 100644 --- a/crates/typst/src/eval/plugin.rs +++ b/crates/typst/src/eval/plugin.rs @@ -195,6 +195,7 @@ impl Plugin { } /// Call the plugin function with the given `name`. + #[comemo::memoize] pub fn call(&self, name: &str, args: Vec) -> StrResult { // Find the function with the given name. let func = self