From 4ddd6f329163cbac5ff31e51a5b028d8eeedadd2 Mon Sep 17 00:00:00 2001 From: Dennis Francis Date: Thu, 8 Nov 2018 12:23:00 +0530 Subject: Cache the vConditions array... used in ScInterpreter::IterateParameterIfs(). Store this cache as a member of ScInterpreterContext (maConditions). Create a static pool of ScInterpreterContext's so that the embedded maConditions is reused everytime a formula-group/ formula-cell is calculated. There needs to be two separate static pools - one for threading, one for non-threaded computation of formula-cells. With this, we can have better performance of the cached maConditions as well as mScLookupCache. In threaded case there is no recursive computation of cells as dependencies are all pre-computed. The thread-indexed lookup cache array in ScDocument is removed as now the lookup caches on context lives as long in the static context pools. This cached vConditions array can take advantage when there are lots of SUMIFS/COUNTIFS with arguments of similar dimensions in the document. Otherwise it will be allocated from scratch for every COUNTIFS/SUMIFS formula-cell. Change-Id: I654b05e55035ce6efcf07d32d36623c9d76b0ff6 Reviewed-on: https://gerrit.libreoffice.org/63066 Tested-by: Jenkins Reviewed-by: Dennis Francis --- sc/inc/document.hxx | 1 - 1 file changed, 1 deletion(-) (limited to 'sc/inc/document.hxx') diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 22ce96e010ef..603d9590033a 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -457,7 +457,6 @@ private: mutable ScInterpreterContext maInterpreterContext; osl::Mutex mScLookupMutex; // protection for thread-unsafe parts of handling ScLookup - std::vector mThreadStoredScLookupCaches; // temporarily stored for computation threads static const sal_uInt16 nSrcVer; // file version (load/save) sal_uInt16 nFormulaTrackCount; -- cgit