UTA Posted December 7, 2007 Posted December 7, 2007 (edited) Hi to everybody, Attached is the relevant part - just to make it easier - of my source you need for this question. Every five seconds it gets all the emails of a public (exchange) folder and inserts them into a listview. So perhaps it's also a kind of example how to do that (I saw a few questions about that during my research about the following problem). My problem: If you have a look into the heart of the _UpdateListView-Function you can see a For-Next-Loop which inserts all found items into the listview. After recognizing performance problems during this operation I searched for the reason and identified the following line: _GUICtrlListView_AddSubItem ($SListView, $i-1, $Items.Item($i).SenderName, 1) The whole loop as it is at the moment takes about 3 to 6 seconds to update. [edit: time is related to the number of items in the folder. here: approx. 70] During that time the whole GUI is freezed (because the source is working in the for-next-loop). Commenting the line above results in a significant performance-raise. Then it takes only 0.3 to 0.5 seconds. The reason is the .SenderName-Object. BUT I DON'T KNOW WHY? Does anybody of the COM-gurus here know why or perhaps a way to work around this performance-gap?performance.au3 Edited December 7, 2007 by UTA
ptrex Posted December 7, 2007 Posted December 7, 2007 @UTAYou can try to read the data to an ARRAY and then display the LISTVIEWIf it does not solve the issue, you can read in the data using ADO and then fill up the LISTVIEW.Both ways will improve speed.I made a speed improvement script for Excel Read Excel using SQLThis might get you going.regardsptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
UTA Posted December 7, 2007 Author Posted December 7, 2007 You can try to read the data to an ARRAY and then display the LISTVIEWIf it does not solve the issue, you can read in the data using ADO and then fill up the LISTVIEW.Both ways will improve speed.I made a speed improvement script for Excel Read Excel using SQLThis might get you going.I tried to read in 2-dim array and insert the array into the listview but it took longer than without it. I was sceptic before because the object itself seems the problem. Unfortunately my suspicion was correct, damn...Average time:using UDF-functions: 1863msusing Built-in functions: 2249msusing array with udf-functions: 2026msThe other idea using ADO is to complex for me. I had a look to your example but sorry, I am not able to port that to my needs... May I ask for an example ?Otherwise any other ideas?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now