New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] evaluation: accept 1x1 result array in sub-formula #3750
Conversation
Possibility to go further and remove refFn in compilation parameters. POC #3747 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few performance suggestions.
Did you try measuring if it has a measurable impact?
de45464
to
5c4af69
Compare
src/functions/index.ts
Outdated
const argDefinition = descr.args[descr.getArgToFocus(i + 1) - 1]; | ||
const acceptMatrix = argDefinition.type.some((t) => t.startsWith("RANGE")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can measure a performance hit of ~+4.5% (on RNG's spreadsheet)
maybe we can try to move those two lines to check if the arg accepts a matrix outside of return function (this: EvalContext, ...
to compute it only once (keep an array of booleans)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay with this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to know if arg accept matrix or not, an attribute was added on argFunctionDecription
.
The attribute is computed when formula is added to the formula registry.
If ok for you, I fixup the last commit
5c4af69
to
116228e
Compare
Before this commit, when a formula function expected a simple argument, and it received an array, we transformed the array into a simple argument if the array was of size 1x1 However, this process was only done when reading the references to the ranges. This commit extends the process when the result array comes from a sub-formula and no longer range references. Task 3756474
116228e
to
b113dfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't measure any performance impact 👍
Thanks
robodoo r+
Description:
Before this commit, when a formula function
expected a simple argument, and it received
an array, we transformed the array into a
simple argument if the array was of size 1x1
However, this process was only done when
reading the references to the ranges.
This commit extends the process when the result
array comes from a sub-formula and no longer
range references.
Task: : 3756474
review checklist