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