Why do collapsed elements still get marked as a dirty region, and rendered?

Go To StackoverFlow.com

1

I noticed a slight performance hiccup when playing video and decided to profile it with the Perforator and fixed the issue easily but came across a conspicuous region being drawn very rapidly 100% of the time. I am worried this dirty region could hinder performance.

Here is the region It's the gray box, the screenshot happened to catch it between rendering.

Now I found the culprit -- a busy indicator (from WPFToolkit) with its visibility set to Collapsed. No other collapsed controls are rendering like this, so I must assume it's due to the ProgressBar IsIndeterminate flag.

Two questions:

  • Could this escalate to being a real issue for performance, or is this relatively common?
  • Would it be better to change its state out of IsIndeterminate = true ?
2012-04-05 21:27
by erodewald
Confirmed with Telerik's RadProgressBar as well - AlexPi 2012-05-24 21:52


2

Animation in WPF produces dirty region even if it is collapsed or behind some elements. That's the known issue and could lead to performance degradation depending on elements count and animation resolution.

I recommend you to stop animation while your progress indicator in not visible. This should help.

2012-04-05 21:38
by Sergei B.
It's not showing up as rendered any more when I added a Style Trigger which changed IsDeterminate when it was not visible. Seems like this could be pretty dangerous if left unchecked. Thanks - erodewald 2012-04-05 21:44
Ads