diff options
author | Daniel Bankston <daniel.e.bankston@gmail.com> | 2012-07-28 03:24:57 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-08-24 11:55:44 -0400 |
commit | deaac6fffa883d5604a35eb0706c7526b87398cc (patch) | |
tree | a7a5d089c2c9d00449ddcc9ea2e3df6920df5e59 /sc/source/ui | |
parent | 1b40fbe41459a2231870af94a06263d89af554a6 (diff) |
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
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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); |