| commit | cabaadf278ba099c53ed2b7a32f1e11bc632ad3a | [log] |
|---|---|---|
| author | Noel Grandin <noel.grandin@collabora.co.uk> | Mon Jun 03 16:52:02 2019 +0200 |
| committer | Xisco FaulĂ <xiscofauli@libreoffice.org> | Tue Jun 04 13:15:01 2019 +0200 |
| tree | be21d1588323f20c9b71b8ca32159cfd8ed4869e | |
| parent | c4eb7dddf047a613fee78188a65b36f5215b4c21 [diff] |
tdf#121094 Opening xlxs with many rows takes several minutes Use a more useful expansion strategy when re-sizing the array, we use this 150% in a lot of other places. This takes the opening time from more than 4m (I lost patience) to under 5s. Change-Id: I8511662947d737c26ec49503a75af8d4cf447f67 Reviewed-on: https://gerrit.libreoffice.org/73394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 79927a934b8a27bd4dee7a263171981e6ca22f8a) Reviewed-on: https://gerrit.libreoffice.org/73433 Reviewed-by: Xisco FaulĂ <xiscofauli@libreoffice.org>
diff --git a/sc/source/core/data/compressedarray.cxx b/sc/source/core/data/compressedarray.cxx index f02956b..2016478 100644 --- a/sc/source/core/data/compressedarray.cxx +++ b/sc/source/core/data/compressedarray.cxx
@@ -20,8 +20,6 @@ #include <compressedarray.hxx> #include <global.hxx> static const size_t nScCompressedArrayDelta = 4; template< typename A, typename D > ScCompressedArray<A,D>::ScCompressedArray( A nMaxAccessP, const D& rValue ) : nCount(1) @@ -84,7 +82,7 @@ size_t nNeeded = nCount + 2; if (nLimit < nNeeded) { nLimit += nScCompressedArrayDelta; nLimit *= 1.5; if (nLimit < nNeeded) nLimit = nNeeded; std::unique_ptr<DataEntry[]> pNewData(new DataEntry[nLimit]);