Hi, i have currently a performance problems with UltraListView which should show a folder content with big number of files.
My idea was to create items first with name and default icon only. Then get the subitem values and right thumbnail later if the item gets visible.
I haven't found an event like "ItemVisibleChanged" or alike. Is it possible somehow else, may be with creation filter?
Thank you
It would probably be better if you could provide more details on the performance problem; if there's a bug causing it, we would probably want to fix that.
Note that when dealing with large numbers of items, the best way to populate the control's Items collection is to first populate an array, and then use the UltraListView.Items.AddRange method. Because the control has a lot of housekeeping to do when you use the Add method, performance can be orders of magnitude better in some cases when you use AddRange instead.
Also note that there is a sample (might be in the legacy samples now) called Infragistics File Explorer, which features this control, and demonstrates how to emulate the Windows File Explorer using the UltraListView control.
Thank you for the fast answer.
No, I don't think there is a bug in UltraListView control. Seems one of my collegues has adopted your File Explorer sample in some weird manner. The items are already initialized as an array and added with AddRange. But the most time was wasted for getting file icons and SHGetFileInfo calls. We also getting some additional infos from DB for the file items. And that all was for all items once in UI thread, which blocks the application for about 30 seconds if the folder contains some thousands files. (tried with e.g. user temp folder)
I have already tried the custom creation filter solution from Dimitar. It works already much faster. Blocking time is about 2 seconds, which is comparable with windows explorer, perhaps just for getting the files list.
I have still some questions:
- The scrolling is now somehow stuttering. Is there further optimization possibilities here? Would it bring something if I use other thread or async/await within creation filter?
- Still some problems with out of memory now. I would try to dispose the item icons if out of visibility. Is it possible?