Is there a way to fill a ListIcon faster than with this AddGadgetItem?
I have to fill a ListIcon with more than 50.000 Items.
When its in memory its so great and fast to handle.
Prob is.. to load it into the gadget needs Minutes !!
Any Idea?
Greets
Chris
Fill a ListIcon faster than with AddGadgetItem?
You can momentary stop the gadget from updating the GUI while you fill the list. Try if this might work:
Code: Select all
SendMessage_(GadgetID(#Your_iconlist),#WM_SETREDRAW, #FALSE, 0)
; update your list here
; enable the drawing of the gadget again
SendMessage_(GadgetID(#Your_iconlist),#WM_SETREDRAW, #TRUE, 0)
If you're really desperate to speed things up then you could look into a 'virtual' List View whereby the application is responsible for looking after the contents of the List Icon. In this way, the data is only ever stored once (by the application) and not duplicated by Windows as part of its work in looking after the control.
When Windows needs to update the control etc. it fires off various messages to the application requesting the information it needs.
However, instead of populating the list icon item by item with text, you would have to populate the List View with all the callback items and I do not know how much time this might save (if any!) I've never actually used such a control.
It's probably a last resort and I admit, using a virtual list view is probably directed more at conserving memory than speeding things up!
Regards.
When Windows needs to update the control etc. it fires off various messages to the application requesting the information it needs.
However, instead of populating the list icon item by item with text, you would have to populate the List View with all the callback items and I do not know how much time this might save (if any!) I've never actually used such a control.
It's probably a last resort and I admit, using a virtual list view is probably directed more at conserving memory than speeding things up!
Regards.
I may look like a mule, but I'm not a complete ass.
-
- User
- Posts: 14
- Joined: Mon Aug 15, 2005 10:14 pm
- Location: Canada
IconListView Loading Time
And to join this debate I am going to ask something that I really don't know anything about so don't laugh but here goes anyway. If you wait the 3 minutes or more it takes to load 50,000 items into the list for the initial time only, is there then a way to save the chunk of memory that holds the data for the listview (intact) into for example, a binary file, so that on subsequent runs you can then load the binary file back into memory (intact) and point the treeview at it, rather than rebuild the list. There .... embarrassing but now I have proved to everyone that I really have no idea what I'm talking about, so don't laugh, but I am sort of having the same issue loading a tree with 20,000 rows. It takes over a minute to start the program.
Great ! I like this Way of thinking.
Right now I play with SQLite 3 and its fast.. with this and some other tricks my 50.000 should run into Mem withing 10 secs. Than LiveTime Recording and thats it. Only after Restart of the Program again the PreLoading. I am sure will find a way to do it faster.
Something like a Memory backup.. yes I also saw some Routines.. but have no Idea where to get the Pointers and how to code it.
/ chris
Right now I play with SQLite 3 and its fast.. with this and some other tricks my 50.000 should run into Mem withing 10 secs. Than LiveTime Recording and thats it. Only after Restart of the Program again the PreLoading. I am sure will find a way to do it faster.
Something like a Memory backup.. yes I also saw some Routines.. but have no Idea where to get the Pointers and how to code it.
/ chris
Nice idea, but I don't think there's any way around the fact that when a list view control is created, it's list of rows is empty and they require populating one by one. We either populate them (row by row) with text, or with callback items in the case of a virtual list view. I'm guessing, but I would imagine Windows allocates memory on a row by row basis as needed and so I would be surprised if what you propose could work.
Course, I could be talking out my backside again!
We'll soon find out when Sparkie wanders along! 
Course, I could be talking out my backside again!


I may look like a mule, but I'm not a complete ass.
Splash screen while loading....
Hi all !
I created a small app that load a list of files to ListView at the opening of program. Sometimes, if there are so many files, it will load quite slow and showing the "white screen" at ListView area. I think we have to make a Splash screen waiting for loading finish.
Can you suggest the way to create a Splash screen without using JPG file ?..
I created a small app that load a list of files to ListView at the opening of program. Sometimes, if there are so many files, it will load quite slow and showing the "white screen" at ListView area. I think we have to make a Splash screen waiting for loading finish.
Can you suggest the way to create a Splash screen without using JPG file ?..
TitaniumT