svx/source/tbxctrls/StylesPreviewWindow.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7925c5d445870a5021761ef55c0c1c5314ecfae9
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Jun 3 15:23:15 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Jun 3 21:16:18 2023 +0200

    perf: use freeze/thaw around block insert of multiple icons
    
    into the style preview widget in the tabbed view
    
    |--1.67%--StylesListUpdateTask::Invoke
    |          StylesPreviewWindow_Base::UpdateStylesList
    |          weld::IconView::append (inlined)
    |          JSIconView::insert
    |          |
    |          |--1.58%--SalInstanceIconView::insert
    |          |          |
    |          |          |--1.19%--SvTreeListBox::Insert
    |          |          |          SvTreeList::Insert
    |          |          |          SvTreeList::Broadcast (inlined)
    |          |          |          SvTreeListBox::ModelNotification
    
    Change-Id: I1c1058324a056e7c8fb42f31c5b4919fcc5870e6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152538
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/svx/source/tbxctrls/StylesPreviewWindow.cxx 
b/svx/source/tbxctrls/StylesPreviewWindow.cxx
index cd65ff839b1d..81f8a5f8c71f 100644
--- a/svx/source/tbxctrls/StylesPreviewWindow.cxx
+++ b/svx/source/tbxctrls/StylesPreviewWindow.cxx
@@ -541,6 +541,7 @@ void StylesPreviewWindow_Base::UpdateStylesList()
         }
     }
 
+    m_xStylesView->freeze();
     m_xStylesView->clear();
     for (const auto& rStyle : m_aAllStyles)
     {
@@ -548,6 +549,7 @@ void StylesPreviewWindow_Base::UpdateStylesList()
 
         m_xStylesView->append(rStyle.first, rStyle.second, pImg);
     }
+    m_xStylesView->thaw();
 }
 
 StylesPreviewWindow_Impl::StylesPreviewWindow_Impl(

Reply via email to