[ooo-build-commit] .: patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Jun 4 09:43:10 PDT 2010


 patches/dev300/apply                                 |    3 ++
 patches/dev300/calc-perf-ods-export-hidden-rows.diff |   25 +++++++++++++++++++
 2 files changed, 28 insertions(+)

New commits:
commit a5a34d680d416549b2c73c55ec62595533317899
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri Jun 4 12:35:50 2010 -0400

    Fix poor performance on saving ods doc with lots of hidden rows.
    
    * patches/dev300/apply:
    * patches/dev300/calc-perf-ods-export-hidden-rows.diff: the reason
      came down to the fact that I was comparing the heights of hidden
      rows in two different ways, which forced Calc to iterate over the
      entire rows from 0 to MAXROW. (deb#582785)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index abc102e..8a4d3bc 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3601,6 +3601,9 @@ calc-formula-r1c1-parser-fix.diff, n#604903, kohei
 
 system-mdds.diff, rengelha
 
+# Fix poor performance on saving document with hidden rows.
+calc-perf-ods-export-hidden-rows.diff, deb#582785, kohei
+
 [ GentooExperimental ]
 SectionOwner => hmth
 # jemalloc allocator
diff --git a/patches/dev300/calc-perf-ods-export-hidden-rows.diff b/patches/dev300/calc-perf-ods-export-hidden-rows.diff
new file mode 100644
index 0000000..9fa54e1
--- /dev/null
+++ b/patches/dev300/calc-perf-ods-export-hidden-rows.diff
@@ -0,0 +1,25 @@
+diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
+index 6490cf4..75c5266 100644
+--- sc/source/core/data/document.cxx
++++ sc/source/core/data/document.cxx
+@@ -3717,15 +3717,18 @@ SCROW ScDocument::GetNextDifferentChangedRow( SCTAB nTab, SCROW nStart, bool bCa
+ {
+     if ( ValidTab(nTab) && pTab[nTab] && pTab[nTab]->GetRowFlagsArray() && pTab[nTab]->mpRowHeights )
+     {
++        // Use the original row height for comparison, which may not be zero 
++        // even for hidden rows; it's the height before the row has become
++        // hidden.
+         BYTE nStartFlags = pTab[nTab]->GetRowFlags(nStart);
+-        USHORT nStartHeight = pTab[nTab]->GetOriginalHeight(nStart);
++        USHORT nStartHeight = pTab[nTab]->GetRowHeight(nStart, NULL, NULL, false);
+         for (SCROW nRow = nStart + 1; nRow <= MAXROW; nRow++)
+         {
+             size_t nIndex;          // ignored
+             SCROW nFlagsEndRow;
+             SCROW nHeightEndRow;
+             BYTE nFlags = pTab[nTab]->GetRowFlagsArray()->GetValue( nRow, nIndex, nFlagsEndRow );
+-            USHORT nHeight = pTab[nTab]->GetRowHeight(nRow, NULL, &nHeightEndRow);
++            USHORT nHeight = pTab[nTab]->GetRowHeight(nRow, NULL, &nHeightEndRow, false);
+             if (((nStartFlags & CR_MANUALBREAK) != (nFlags & CR_MANUALBREAK)) ||
+                 ((nStartFlags & CR_MANUALSIZE) != (nFlags & CR_MANUALSIZE)) ||
+                 (bCareManualSize && (nStartFlags & CR_MANUALSIZE) && (nStartHeight != nHeight)) ||


More information about the ooo-build-commit mailing list