Sunday, June 13, 2004 9:48 PM
The perils of premature optimization
A few months back, I was griping about the flicker you get with the ListView Control. Frustration with Flicker
. It turns out that my problem was due to premature optimization. I was using BeginUpdate/EndUpdate every time I added a record to the ListView, even if it was only one item. Since I was adding one - five per second, this was a lot of updates. Well, it appears that Begin/EndUpdate causes the entire ListView to redraw, even if only one record is changed, even if it's off-screen. By only using Begin/EndUpdate for large updates, there is no problem now. Yeah!
Filed under: .NET