summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-06-25 14:22:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-06-26 08:44:54 +0200
commit32b295b7392c4a14def87e4fa0b9fa74f9441ffd (patch)
treeb272dc66dcafb0d1faf0ae19928c2d46140cc366 /include
parent085510962a4455f07d7be713adbb6084302c121e (diff)
speed up DefaultItemInstanceManager
we can store the registered items in a map indexed by which-id, and avoid most of the search cost Change-Id: Ib3fbed436bc034e603819cfef8223dcc77eb7f06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/svl/poolitem.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index 4f71bc871a58..bdfb814e3c0a 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -33,6 +33,7 @@
#include <tools/long.hxx>
#include <boost/property_tree/ptree_fwd.hpp>
#include <unordered_set>
+#include <unordered_map>
class IntlWrapper;
@@ -638,7 +639,7 @@ private:
// that specific Item (see other derivations)
class SVL_DLLPUBLIC DefaultItemInstanceManager : public ItemInstanceManager
{
- std::unordered_set<const SfxPoolItem*> maRegistered;
+ std::unordered_map<sal_uInt16, std::unordered_set<const SfxPoolItem*>> maRegistered;
public:
DefaultItemInstanceManager(const std::size_t aClassHash)