WPF abnormal CPU usage for animation
- by 0xDEAD BEEF
HI!
I am developing WPF application and client reports extreamly high CPU usage (90%) (whereas i am unable to repeat that behavior).
I have traced bootleneck down to these lines. It is simple glowing animation for small single led control (blinking led). What could be reason for this simple annimation taking up SO huge CPU resources?
<Trigger Property="State">
<Trigger.Value>
<local:BlinkingLedStatus>Blinking</local:BlinkingLedStatus>
</Trigger.Value>
<Trigger.EnterActions>
<BeginStoryboard Name="beginStoryBoard">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="glow" Storyboard.TargetProperty="Opacity" AutoReverse="True" From="0.0" To="1.0" Duration="0:0:0.5" RepeatBehavior="Forever"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<StopStoryboard BeginStoryboardName="beginStoryBoard"/>
</Trigger.ExitActions>
</Trigger>