mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Memoize plugin invocations
This commit is contained in:
parent
88404e924b
commit
5df550f8e8
@ -195,6 +195,7 @@ impl Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Call the plugin function with the given `name`.
|
/// Call the plugin function with the given `name`.
|
||||||
|
#[comemo::memoize]
|
||||||
pub fn call(&self, name: &str, args: Vec<Bytes>) -> StrResult<Bytes> {
|
pub fn call(&self, name: &str, args: Vec<Bytes>) -> StrResult<Bytes> {
|
||||||
// Find the function with the given name.
|
// Find the function with the given name.
|
||||||
let func = self
|
let func = self
|
||||||
|
Loading…
x
Reference in New Issue
Block a user