28 February 2007, 08:37 in Programming
Windows Forms performance tips
Just came across an article on MSDN Magazine entitled Practical Tips For Boosting The Performance Of Windows Forms Apps. The article is from March 2006 but still very useful.
The topics covered include the following (plus more):
- Minimizing perceived startup time by showing a splash screen as soon as possible.
- Making the UI load faster by making time consuming operations run on another thread (the article mentions the BackgroundWorker class although I prefer to work with threads directly).
- When populating Windows Forms controls, such as a ListView or TreeView control, you can use the BeginUpdate() and EndUpdate() methods to prevent the control from redrawing itself as you add each item.
- Use of BeginLayout() and EndLayout() to prevent unnecessary layout changes when doing multiple operations such as resizing.
- Improving painting performance using clip regions and double buffering.
If you’ve ever run into any performance issues when developing .NET Windows Forms applications, this article contains some useful pointers that may help you solve them.
Next article: Swiftech MCX159-Cu chipset heatsink & fan
Previous article: How to Shower: Women vs. Men