From b27755b704fa4866025f1ed6d26c0d43aafa3407 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 13 May 2019 16:28:14 +0200 Subject: 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 --- include/o3tl/sorted_vector.hxx | 5 +++++ include/svl/listener.hxx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') 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 -#include +#include class SvtBroadcaster; class SfxHint; @@ -29,7 +29,7 @@ class SfxHint; class SVL_DLLPUBLIC SvtListener { friend class SvtBroadcaster; - typedef std::unordered_set BroadcastersType; + typedef o3tl::sorted_vector BroadcastersType; BroadcastersType maBroadcasters; const SvtListener& operator=(const SvtListener &) = delete; -- cgit