| commit | f7f4b00185318c1f2949ca42316e1a92c57da23b | [log] |
|---|---|---|
| author | Eike Rathke <erack@redhat.com> | Sat Nov 12 21:12:18 2022 +0100 |
| committer | Caolán McNamara <caolanm@redhat.com> | Sun Nov 13 18:33:55 2022 +0100 |
| tree | 8dcc7eaab322e46affff216991f090eb6ff010d1 | |
| parent | ea8a74ae6881f5ecacc6743b18c03ce3e759779a [diff] |
Resolves: tdf#152014 When reusing interpreter context slot clear lookup cache ... if different doc As is, unthreaded the same slot gets reused for every calculation. That could benefit from keeping 2-3 documents cached to not throw away the lookup cache each time when alternating between documents. Change-Id: Id024333f72bcdcd6109042dec1104f3029955d3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142639 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit f86a0666ac337363b470c9c67fa0970a330b26a2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142630 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sc/source/core/tool/interpretercontext.cxx b/sc/source/core/tool/interpretercontext.cxx index 0df4a84..e66a8b9 100644 --- a/sc/source/core/tool/interpretercontext.cxx +++ b/sc/source/core/tool/interpretercontext.cxx
@@ -53,7 +53,11 @@ void ScInterpreterContext::ResetTokens() void ScInterpreterContext::SetDocAndFormatter(const ScDocument& rDoc, SvNumberFormatter* pFormatter) { mpDoc = &rDoc; if (mpDoc != &rDoc) { mxScLookupCache.reset(); mpDoc = &rDoc; } mpFormatter = pFormatter; }