I have Silverlight application that calls WCF services. During the call it shows fullscreen animation - spinning circle on top of semi-transparent modal popup. The problem is, if animation is shown, the service calls are often finished with big delays (if at all), especially if there're multiple calls. If I remove one line to .Begin() animation, service calls are fast. This happens on multiple machines.
Another funny thing is that if I switch to another application during the "frozen" call (e.g. Visual Studio), and then back to Silverlight app, the service call in 80% cases immediately finishes.
Here's the very simple animation that I run:
<Canvas.Triggers>
<EventTrigger RoutedEvent="Canvas.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard x:Name="spin" BeginTime="0" RepeatBehavior="Forever">
<DoubleAnimation Storyboard.TargetName="rotate" Storyboard.TargetProperty="Angle" To="360" Duration="0:0:02" />
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Canvas.Triggers>
<Canvas.RenderTransform>
<TransformGroup>
<RotateTransform x:Name="rotate" Angle="0" />
<ScaleTransform ScaleX="1" ScaleY="1"/>
</TransformGroup>
</Canvas.RenderTransform>
I understand that animations may cause performance hit, but I don't expect it to delay WCF service calls forever.
What can be the reason for it? I don't even understand where to dig further.
I've found a link to WCF performance problems (yet to read) that may be related to the fact that I do second call from inside "first call finished" handler. Still I don't understand why animation causes infinite delays.
Also, during this "frozen" call browser is very unresponsive, e.g. it takes about 5 second for the [X] close button to act.