summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-01-04 14:07:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-01-04 16:06:08 +0100
commit746127cf803070c5a695a7cb30a2ecdb5a777e75 (patch)
tree713f63de46f48779b365971b0d71726905b18888 /svx/source/svdraw
parent7ba99b8d6da07c2133c644de4d1a3613a9fa5a68 (diff)
use deque in SdrObjList
which has much better performance for (a) inserting stuff at the front (b) appending large numbers of items something that happens when constructing large charts - shaves 5% off the load time for large sample bar chart Change-Id: I3ebccbfdc75e4df3ec88eb2dde46acfe0ab0ae7d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdpage.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 99c6ab9d3185..d4322e3a8720 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -58,8 +58,6 @@
using namespace ::com::sun::star;
-const sal_Int32 InitialObjectContainerCapacity (64);
-
//////////////////////////////////////////////////////////////////////////////
SdrObjList::SdrObjList()
@@ -67,7 +65,6 @@ SdrObjList::SdrObjList()
mbRectsDirty(false),
mbIsNavigationOrderDirty(false)
{
- maList.reserve(InitialObjectContainerCapacity);
}
void SdrObjList::impClearSdrObjList(bool bBroadcast)
@@ -641,7 +638,7 @@ void SdrObjList::sort( std::vector<sal_Int32>& sortOrder)
// example maList [T T S T T] ( T T = shape with textbox, S = just a shape )
// (shapes at positions 0 and 2 have a textbox)
- std::vector<SdrObject*> aNewList(maList.size());
+ std::deque<SdrObject*> aNewList(maList.size());
std::set<sal_Int32> aShapesWithTextbox;
std::vector<sal_Int32> aIncrements;
std::vector<sal_Int32> aDuplicates;