summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-10-25 22:48:28 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-10-26 20:33:45 +0200
commitf7e6153c1bcd87a7a2f2d839c49bd7615c8dca5b (patch)
treee2f457901686a27eeff74367952e92b0056c0141 /desktop/source
parent95cc31f15712bcd2b9829a4f9708374647af6e74 (diff)
use boost flat_map for faster map
setUpdatedTypePerViewId() gets called so often that even unordered_map lookup and allocations show up in profiling. It seems that flat_map can do better. Change-Id: Id2e4f0c40d6973b51e557f84a08bf12feb58b3ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124210 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 30bfd4594754..8543bfd49513 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2138,7 +2138,7 @@ void CallbackFlushHandler::enqueueUpdatedTypes()
// First move data to local structures, so that callbacks don't possibly modify it.
std::vector<bool> updatedTypes;
std::swap(updatedTypes, m_updatedTypes);
- std::unordered_map<int, std::vector<PerViewIdData>> updatedTypesPerViewId;
+ boost::container::flat_map<int, std::vector<PerViewIdData>> updatedTypesPerViewId;
std::swap(updatedTypesPerViewId, m_updatedTypesPerViewId);
// Some types must always precede other types, for example