diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-12-18 22:37:19 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-12-21 14:30:07 +0000 |
commit | 6833f382c5c8350256e97e2b342eb939a8c373ba (patch) | |
tree | 5f1f0dd5f0f6a957f54a7d9a4b4210ca0bea865b /sc/source/core | |
parent | 171ca32e02976022858b9f0affb532a35c495833 (diff) |
tdf#96588 - avoid redundant work on large numbers of trailing rows.
No need to crunch the same data repeatedly for up to 1 million rows.
Change-Id: Iab70187bc7ca5fc4c6c73810d6a8b76808073433
Reviewed-on: https://gerrit.libreoffice.org/20812
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc/source/core')
-rw-r--r-- | sc/source/core/data/dpfilteredcache.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/data/dpfilteredcache.cxx b/sc/source/core/data/dpfilteredcache.cxx index 3d93d740c6bf..5714ad2113d6 100644 --- a/sc/source/core/data/dpfilteredcache.cxx +++ b/sc/source/core/data/dpfilteredcache.cxx @@ -190,6 +190,11 @@ void ScDPFilteredCache::fillTable( SCROW nIndex = getCache().GetItemDataId(nCol, nRow, bRepeatIfEmpty); SCROW nOrder = getOrder(nCol, nIndex); aAdded[nOrder] = nIndex; + + // tdf#96588 - large numbers of trailing identical empty + // rows generate the same nIndex & nOrder. + if (nRow == nDataSize) + break; } for (SCROW nRow = 0; nRow < nMemCount; ++nRow) { |