use std::unordered_map in cppuhelper ServiceManager

It's faster and I do not see any reason for the map to be sorted.
cppuhelper::ServiceManager::findServiceImplementation() may be called
quite often e.g. during text layout by i18npool::BreakIterator.

Change-Id: If8c77c506b88a0a3eac29e0d20d43d2110eed4ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112280
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
Luboš Luňák
2021-03-10 19:19:26 +01:00
parent 2502b80e57
commit bd0dd2589c

View File

@@ -12,7 +12,7 @@
#include <sal/config.h>
#include <cassert>
#include <map>
#include <unordered_map>
#include <memory>
#include <string_view>
#include <vector>
@@ -164,17 +164,17 @@ public:
css::uno::Reference<css::uno::XInterface> const & instance);
};
typedef std::map< OUString, std::shared_ptr< Implementation > >
typedef std::unordered_map< OUString, std::shared_ptr< Implementation > >
NamedImplementations;
typedef
std::map<
std::unordered_map<
css::uno::Reference< css::lang::XServiceInfo >,
std::shared_ptr< Implementation > >
DynamicImplementations;
typedef
std::map<
std::unordered_map<
OUString,
std::vector< std::shared_ptr< Implementation > > >
ImplementationMap;