summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-09-13 15:43:18 +0200
committerLaurenz <laurmaedje@gmail.com>2023-09-13 15:43:18 +0200
commit5df550f8e8cf60940f1a9c741e4663fbfd636ba3 (patch)
tree24ff872ecb67f31a195ca555939582c7d3df6f2f
parent88404e924b20cdacf6c3c2ab79c432e2a65c8f5f (diff)
Memoize plugin invocations
-rw-r--r--crates/typst/src/eval/plugin.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/typst/src/eval/plugin.rs b/crates/typst/src/eval/plugin.rs
index 29ca79c0..11576080 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<Bytes>) -> StrResult<Bytes> {
// Find the function with the given name.
let func = self