map->unordered_map in ConfigurationWrapper::getPropertyValue

no need to use an ordered map here, and an unordered map
is much faster.

Change-Id: Ia4b6fa7174e2d8c62cec80a2ea65e12c0a837ec4
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/9631
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 8003011a7b16bf4f7e3826cba5600b2cea18d1f8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210490
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Noel Grandin
2026-09-04 19:47:21 +02:00
committed by Xisco Fauli
parent 2dc002cab1
commit 63a9abb2ab
+2 -2
View File
@@ -10,7 +10,7 @@
#include <sal/config.h>
#include <cassert>
#include <map>
#include <unordered_map>
#include <memory>
#include <mutex>
#include <string_view>
@@ -134,7 +134,7 @@ css::uno::Any comphelper::detail::ConfigurationWrapper::getPropertyValue(std::u1
// Note that this cache is only used by the officecfg:: auto-generated code, using it for anything
// else would be unwise because the cache could end up containing stale entries.
static std::mutex gMutex;
static std::map<OUString, css::uno::Reference< css::container::XNameAccess >> gAccessMap;
static std::unordered_map<OUString, css::uno::Reference< css::container::XNameAccess >> gAccessMap;
sal_Int32 idx = path.rfind('/');
assert(idx!=-1);