summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2019-10-15 06:57:56 +0530
committerDennis Francis <dennis.francis@collabora.com>2019-10-17 08:06:49 +0200
commit4ee424b3ddc6e483cac8bd76ddc0bcabe48241dc (patch)
treea552432da4728517cea4f0a11816545ebe178caa /formula
parent30d803e83390d8a4f475522dc23bcd107f7fdc12 (diff)
Pre-allocate an ScInterpreter object for each thread...
and reuse them for interpret'ing all cells under the respective threads. This gives a sizeable win in the execution time especially for long formula-groups. Change-Id: Ib340950f21e863b5b821d20c092214d8bc5012aa Reviewed-on: https://gerrit.libreoffice.org/80845 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/token.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index bb08d4447e0d..17594207234f 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1634,6 +1634,12 @@ void FormulaTokenIterator::Jump( short nStart, short nNext, short nStop )
}
}
+void FormulaTokenIterator::ReInit( const FormulaTokenArray& rArr )
+{
+ maStack.clear();
+ Push( &rArr );
+}
+
const FormulaToken* FormulaTokenIterator::GetNonEndOfPathToken( short nIdx ) const
{
FormulaTokenIterator::Item cur = maStack.back();