diff options
author | Eike Rathke <erack@redhat.com> | 2017-12-17 00:46:07 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-17 14:59:53 +0100 |
commit | 3193e78aba75c5b38d2683d9fd8593820048e8b9 (patch) | |
tree | e3db2ba386e21e05d19bef2e3c67f3a75cde44ad | |
parent | ecac94f3a6872538c19827603b52f1ed7e671a4c (diff) |
Related: tdf#114251 disable ocName named expressions for vectorization
Recursive checking of their token arrays would be needed.
This solves the slowness in the non-threading case of tdf#114251
because no arrays are generated for the named ranges, which is
rather a lucky workaround than a solution.
The wrong handling of range references in general (array where
scalar is expected, no implicit intersection) still persists.
Change-Id: I57385bd95efa584108d93d724921285c97a91a45
Reviewed-on: https://gerrit.libreoffice.org/46623
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/core/tool/token.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index f94fb6ddfdcd..cd94fd31058a 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1664,6 +1664,24 @@ void ScTokenArray::CheckToken( const FormulaToken& r ) mbOpenCLEnabled = false; CheckForThreading(eOp); } + else + { + // All the rest, special commands, separators, error codes, ... + switch (eOp) + { + case ocName: + // Named expression would need "recursive" handling of its + // token array for vector state in + // ScFormulaCell::InterpretFormulaGroup() and below. + SAL_INFO("sc.opencl", "opcode " << formula::FormulaCompiler().GetOpCodeMap(sheet::FormulaLanguage::ENGLISH)->getSymbol(eOp) << " disables vectorisation for formula group"); + meVectorState = FormulaVectorDisabledByOpCode; + mbOpenCLEnabled = false; + CheckForThreading(eOp); + break; + default: + ; // nothing + } + } } bool ScTokenArray::ImplGetReference( ScRange& rRange, const ScAddress& rPos, bool bValidOnly ) const |