From d7b4936ddb12eaf55bea49291152487c7c9ba0e0 Mon Sep 17 00:00:00 2001 From: "Adrien Minne (adrm)" Date: Mon, 6 Nov 2023 11:26:39 +0100 Subject: [PATCH] [IMP] evaluation: improve perfs of `getCorrespondingFormulaCell` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The getter `getCorrespondingFormulaCell` was tokenizing the cell's content (via `compile`), which took a bit of time. But this is useless, as we already have the tokens in the formula cell. closes odoo/o-spreadsheet#3143 Task: 3584306 X-original-commit: 3d6f4f95451c7505fce006656c4f9380bcc82136 Signed-off-by: Lucas Lefèvre (lul) --- src/formulas/compiler.ts | 4 ++++ src/index.ts | 10 ++++++++-- .../cell_evaluation/evaluation_plugin.ts | 14 +++++++------- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/formulas/compiler.ts b/src/formulas/compiler.ts index 99f77186ca..359d51761e 100644 --- a/src/formulas/compiler.ts +++ b/src/formulas/compiler.ts @@ -53,6 +53,10 @@ export const functionCache: { [key: string]: Omit