delphithemesuxtheme

Enabling XP visual themes / visual styles kills performance


While trying to modernize the appearance of an old C++Builder / Delphi application, I enabled visual themes (visual styles) and was surprised at just how much of a performance hit themes added. For example, for our primary setup page (an 11-tab, 200-control monster dialog that we don't want to redo right now for reasons of development time and retraining costs):

I get similar results on both a Windows XP desktop and a Windows 7 VM.

I realize that there are steps I could take to improve this particular case (such as lazily loading the dialog's tabs or redesigning it completely), but is it typical for themes to add such a noticeable performance hit? Are there any easy suggestions for avoiding this performance hit?


Solution

  • Wow. I'm not sure I've ever had 200 controls on a single form. Here are a couple of suggestions.