From 75589a573e4c19e4592a38943ccb643397001f32 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 20 Aug 2026 14:03:10 +0200 Subject: [PATCH] map->unordered_map in PropertySetMixin no need to use an ordered map here, and an unordered map is much faster. Note that I leave the property name map alone, because the ordering of that shows up in the output of some methods, and some code is sensitive to non-ordered property names. Change-Id: I34f9c516b6e5a981f789615fe986cd026c2ac8dd Signed-off-by: Noel Grandin Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9632 Tested-by: Jenkins CPCI Reviewed-by: Mike Kaganski (cherry picked from commit 08443a9446cb1cfe1eae18955598f1a23a7a9aad) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210491 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli --- cppuhelper/source/propertysetmixin.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cppuhelper/source/propertysetmixin.cxx b/cppuhelper/source/propertysetmixin.cxx index 78b1c2204a28..64961fd1df4c 100644 --- a/cppuhelper/source/propertysetmixin.cxx +++ b/cppuhelper/source/propertysetmixin.cxx @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -373,13 +374,13 @@ public: PropertySetMixinImpl::Implements implements; css::uno::Sequence< OUString > handleMap; - typedef std::map< OUString, BoundListenerBag > BoundListenerMap; + typedef std::unordered_map< OUString, BoundListenerBag > BoundListenerMap; typedef std::multiset< css::uno::Reference< css::beans::XVetoableChangeListener > > VetoListenerBag; - typedef std::map< OUString, VetoListenerBag > VetoListenerMap; + typedef std::unordered_map< OUString, VetoListenerBag > VetoListenerMap; mutable std::mutex mutex; BoundListenerMap boundListeners;