Populating ListView takes forever
Posted on 2003-11-30
I have a listView that I am adding a few thousand items to. The first time I do it, it takes a few seconds, which is fine.
When I reload the data, it takes too long when adding the items to the listView.
I have sorters that sort based on columns when the headers are clicked. I am removing the sorters from the the handlers, for the column clicking and then calling items.Clear() and adding all of the thousand or so items back in. I don't know that this is doing anything, however. It was taking 50 seconds reload. Then I removed the sorters and called BeginUpdate() and EndUpdate(). Now it takes about 9 seconds. Is there anything else I can do to speed this up?