summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-13 16:28:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-16 11:49:25 +0200
commitb27755b704fa4866025f1ed6d26c0d43aafa3407 (patch)
tree94513403f93738df001d7f121912b72fca053efe /include
parent4b04eae81478d4aa19f3bdc3f2d6247063aeb6cd (diff)
tdf#125254 Performance: A spreadsheet opens too slow, part1
This takes the opening time from 55s to 48s for me. Change-Id: Ia60fff33e9948e0bd6906c82b48aa30f8b2551bb Reviewed-on: https://gerrit.libreoffice.org/72394 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/o3tl/sorted_vector.hxx5
-rw-r--r--include/svl/listener.hxx4
2 files changed, 7 insertions, 2 deletions
diff --git a/include/o3tl/sorted_vector.hxx b/include/o3tl/sorted_vector.hxx
index 8324e333198a..35882ab9afca 100644
--- a/include/o3tl/sorted_vector.hxx
+++ b/include/o3tl/sorted_vector.hxx
@@ -113,6 +113,11 @@ public:
m_vector.clear();
}
+ void swap(sorted_vector & other)
+ {
+ m_vector.swap(other.m_vector);
+ }
+
void reserve(size_type amount)
{
m_vector.reserve(amount);
diff --git a/include/svl/listener.hxx b/include/svl/listener.hxx
index 5ba14aea953e..38d72552618a 100644
--- a/include/svl/listener.hxx
+++ b/include/svl/listener.hxx
@@ -21,7 +21,7 @@
#include <svl/svldllapi.h>
-#include <unordered_set>
+#include <o3tl/sorted_vector.hxx>
class SvtBroadcaster;
class SfxHint;
@@ -29,7 +29,7 @@ class SfxHint;
class SVL_DLLPUBLIC SvtListener
{
friend class SvtBroadcaster;
- typedef std::unordered_set<SvtBroadcaster*> BroadcastersType;
+ typedef o3tl::sorted_vector<SvtBroadcaster*> BroadcastersType;
BroadcastersType maBroadcasters;
const SvtListener& operator=(const SvtListener &) = delete;