views:

54

answers:

1

I have a Silverlight 4 application where if a certain usercontrol is visible the CPU utilization jumps to 100%. If the usercontrol is collapsed the CPU drops back to normal.

The XAML involved is way too large to post until I can isolated where the problem more specifically.

FYI: The code in question makes use of a variety of Silverlight Toolkit controls, and includes a lot of Visual State Manager stuff in XAML, if that sparks any ideas...

My gut says it's a bug in Silverlight, but I don't have an easy repo yet...

Does anybody have any good troubleshooting/debugging tips to help isolate the problem?

The app is at: https://vas.3m.com if anybody is bored and wants to see the problem in action (you need to create a free account).

+2  A: 

90% chance that you have a drop shadow on one of the top parent controls. If that is the case then any visual change in any of the children will result in very expensive redraw.

You may want to read this: http://www.youpvp.com/blog/post/What-you-need-to-know-about-DropShadow-to-create-great-Silverlight-applications.aspx

Denis
This smells like it could be right... We use a lot of drop shadows for mouse over events and to highlight selected items...
Scrappydog
DropShadows are the problem. And props to @Avatar for his profiling suggestion which helped confirm the problem was NOT in .NET code.
Scrappydog