Improve performance of function processing
This commit is contained in:
parent
ec698e85de
commit
16da3e9b3b
1 changed files with 2 additions and 3 deletions
|
@ -55,10 +55,9 @@ impl Function {
|
|||
fnc::cast::run(ctx, s, a)
|
||||
}
|
||||
Function::Normal(ref s, ref e) => {
|
||||
let mut a: Vec<Value> = vec![];
|
||||
let mut a: Vec<Value> = Vec::with_capacity(e.len());
|
||||
for v in e {
|
||||
let v = v.compute(ctx, opt, txn, doc).await?;
|
||||
a.push(v);
|
||||
a.push(v.compute(ctx, opt, txn, doc).await?);
|
||||
}
|
||||
fnc::run(ctx, s, a).await
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue