Jump to content
Sign in to follow this  

Bulk Load A Listview

Recommended Posts



I am writing a little program for a local Food CoOp that will allow the users to select food from a list, but the list has around 21000 items in it. I have broken it down by departments, such as Frozen food, or Bulk, but it's still very large numbers. It only takes a split second to read all the data in from a 1.7MB Tab dilimited text file, but the REALLY time consuming part is the _GUICtrlListViewInsertItem.

Code I'm using

Func _OpenCatalog($CatalogFile)
    _FileReadToArray($CatalogFile, $i_Loaded)
    for $i = 1 to $i_Loaded[0]
        _GUICtrlListViewInsertItem($listITEMS, -1, StringReplace($i_Loaded[$i], @TAB, "|"))

The FileReadToArray is taking mabey 500ms. the loop that adds all the items into the listbox is taking about 5 minutes on a Fast computer.

Any ideas how I can just DUMP all the items into the listview?



Share this post

Link to post
Share on other sites


Even after the 5 minutes, you should only have about 4000 items; have you checked?

[limitation of GUI controls in AutoIt is about 4000]

That's why I have tried a GUI that only shows a page at a time;

A. Look at my version of "AutoItEx.au3" which uses a text view, but no sorting[no extra requirements to AutoIt];

B. Or SQLGuiview which imports [ie bulk type speed] the total file initially, and has sort capability with speed [requires SQLite3.exe and SQL UDF];

Last and 3rd to last links in my signature;

Let me know...


Edited by randallc

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.