diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2016-11-04 09:46:29 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-11-04 13:26:53 +0000 |
commit | 5946cc2f7056fc580fefe1b90795e3921bdb3969 (patch) | |
tree | 81975fab81e249dbdcb4e6eab8c33deac624c4a1 | |
parent | 2ba62a78151c3cd8a104b763f29432bb49de5e26 (diff) |
tdf#91260 - ReplaceAll should use a columnar direction.
MDDS is columnular, so this shrinks the working set very
significantly, and should improve performance.
Change-Id: I2aff92b31bfc459e85291059d977541aa65155cf
Reviewed-on: https://gerrit.libreoffice.org/30562
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | sc/source/core/data/table6.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index d983a55889cc..636ca5629592 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -571,10 +571,14 @@ bool ScTable::ReplaceAll( else GetLastDataPos(nLastCol, nLastRow); + // tdf#92160 - columnular replace is faster, and more memory efficient. + SvxSearchItem aCopyItem(rSearchItem); + aCopyItem.SetRowDirection(false); + bool bEverFound = false; while (true) { - bool bFound = Search(rSearchItem, nCol, nRow, nLastCol, nLastRow, rMark, rUndoStr, pUndoDoc); + bool bFound = Search(aCopyItem, nCol, nRow, nLastCol, nLastRow, rMark, rUndoStr, pUndoDoc); if (bFound) { |