sc/source/ui/dbgui/tpsubt.cxx    |    3 +++
 vcl/source/treelist/treelist.cxx |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit ea980b36a7b48a3c9c17cf08d15c5f4f27f79942
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon May 16 22:38:03 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Tue May 17 07:37:15 2022 +0200

    freeze() and thaw() a widget during creation (tdf#149112)
    
    The repeated inserts each trigger SvTreeList::GetVisibleCount(),
    which has a poor performance because of repeated uses of the
    SvListView::Impl::m_DataTable map.
    
    Change-Id: Ibb261a8501a1d5c168b37675e34498386f161595
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134415
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx
index 439ee359f203..aa5f38862701 100644
--- a/sc/source/ui/dbgui/tpsubt.cxx
+++ b/sc/source/ui/dbgui/tpsubt.cxx
@@ -257,6 +257,7 @@ void ScTpSubTotalGroup::FillListBoxes()
     mxLbColumns->clear();
     mxLbGroup->insert_text(0, aStrNone );
 
+    mxLbColumns->freeze();
     sal_uInt16 i=0;
     for ( col=nFirstCol; col<=nMaxCol && 
i<SC_MAXFIELDS(pDoc->GetSheetLimits()); col++ )
     {
@@ -273,6 +274,8 @@ void ScTpSubTotalGroup::FillListBoxes()
         mxLbColumns->set_id(i, "0");
         i++;
     }
+    mxLbColumns->thaw();
+
     // subsequent initialization of the constant:
     nFieldCount = i;
 }
commit 5bf7058f4959ce0cf217817d2b5a30b81c4a7ff9
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon May 16 22:01:31 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Tue May 17 07:37:00 2022 +0200

    std::map -> std::unordered_map (tdf#149112)
    
    Faster and the ordering is not needed.
    
    Change-Id: I9d9f8ef084f441d24d35dc92ecf060f576d7db2e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134414
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index 35125edafe2e..07db41b54266 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -24,10 +24,10 @@
 #include <osl/diagnose.h>
 
 #include <memory>
-#include <map>
+#include <unordered_map>
 
 
-typedef std::map<SvTreeListEntry*, std::unique_ptr<SvViewDataEntry>> 
SvDataTable;
+typedef std::unordered_map<SvTreeListEntry*, std::unique_ptr<SvViewDataEntry>> 
SvDataTable;
 
 struct SvListView::Impl
 {

Reply via email to