delphi - Enabling XP visual themes / visual styles kills performance -


While trying to modernize the presence of an older C + + builder / Delphi application, I enabled visual themes ( ) And was surprised how much of a performance hit topics were added. For example, for our primary setup page (an 11-tab, 200-control monster dialog that we do not want to repeat due to the time of development and repetitive costs):

  • without Themes enabled: ~ 0.1 seconds menu item by clicking on the form shown to the form and its control (as measured by QueryPerformanceCounter), to make ~ 0.9 seconds (like That is shown) by stopwatch) Ultimate User Not really worth giving attention to A's.
  • With the theme enabled: To build the form and its controls: ~ 1.5 seconds by clicking ~ 1.5 seconds in the form being shown menu item. The end user is very noticeable.

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

I know that the steps I can take to improve this particular case (such as loading the tab of the dialog freely or giving it a completely new look), but is it Is there a specialty of topics to hit a remarkable performance? Are there any easy tips to avoid this performance?

Wow, I'm not sure that I have 200 controls on the same form at any time. Here are a few suggestions.

  • This may be a special case where once you start the application and display it as needed instead of making it on demand.

  • I also see what is going on in Constructor or Onsho event. Are you making any lists where the start / end update will be of an advantage?

  • Do you have any code in any adventurous event or the same way that more than once is removed which can wait a later form and a Can be run?

  • What kind of control are you using? If one type of control is especially paints slowly, you may be able to replace it with one that requires a few tests for painting faster, though.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -