Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Efe Gürkan YALAMAN wrote:
-Will improve the performance. There is something I recognized. Without
adding values to the listbox the traverse tooks about 3 seconds. Current
entry insertion is on recursion. Extracting this out of recursion may solve
the problem mostly.

Good catch, it is indeed the darn TreeList that is pathetically
inefficient here. Maybe worth thinking of populating it dynamically
when the users scrools. Attached patch at least shifts the moment when
all the time is spent to the SetUpdateMode(true) call site. ;)

Cheers,

-- Thorsten
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 688b48b..05529ba 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -103,6 +103,8 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt
 
     Reference< XHierarchicalNameAccess > xHierarchicalNameAccess( xNameAccess, 
uno::UNO_QUERY_THROW );
 
+    pPrefBox->SetUpdateMode(sal_False);
+
     uno::Sequence< OUString > seqItems = xNameAccess->getElementNames();
     for( sal_Int16 i = 0; i < seqItems.getLength(); ++i )
     {
@@ -214,6 +216,8 @@ void CuiAboutConfigTabPage::FillItems( Reference< XNameAccess >xNameAccess, OUSt
             InsertEntry( sPrefName, test, sType , sPath );//for testing only will change
         }
     }
+
+    pPrefBox->SetUpdateMode(sal_True);
 }
 
 Reference< XNameAccess > CuiAboutConfigTabPage::getConfigAccess( OUString sNodePath, sal_Bool 
bUpdate )

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.