From deaac6fffa883d5604a35eb0706c7526b87398cc Mon Sep 17 00:00:00 2001 From: Daniel Bankston Date: Sat, 28 Jul 2012 03:24:57 -0500 Subject: Improve matrix import performance. Our latest changes that recalculate volatile formulas at the end of import resulted in several seconds performance loss on a large matrix test file with complex formulas. When the matrix cells are put in the document, ScFormulaCell::SetDirty() gets called. Although the cells are set clean during import after this, SetDirty() also uses ScDocument::TrackFormulas() which puts the cells in the formula tree. So when we call ScDocument::DoRecalc() at the end of import, the interpreter goes through all matrix cells because they are in the formula tree. This commit prevent that from happening, which gives us back our performance. Change-Id: I961f69b0117d4261f8afefb6d94173105f0925b2 --- sc/source/ui/docshell/docsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc/source/ui') diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index d59206a43e2f..2d06f8213a10 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -441,7 +441,7 @@ sal_Bool ScDocShell::LoadXML( SfxMedium* pLoadMedium, const ::com::sun::star::un if(sGenerator.indexOf(SC_LIBO_PROD_NAME) == -1) DoHardRecalc(false); else //still need to recalc volatile formula cells - DoRecalc(false); + aDocument.CalcFormulaTree(false, false, false); aDocument.EnableAdjustHeight(false); -- cgit