diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-09-13 15:43:18 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-09-13 15:43:18 +0200 |
| commit | 5df550f8e8cf60940f1a9c741e4663fbfd636ba3 (patch) | |
| tree | 24ff872ecb67f31a195ca555939582c7d3df6f2f | |
| parent | 88404e924b20cdacf6c3c2ab79c432e2a65c8f5f (diff) | |
Memoize plugin invocations
| -rw-r--r-- | crates/typst/src/eval/plugin.rs | 1 |
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 |
