Try this public profiler: http://blogs.msdn.com/seema/archive/2008/10/08/xperf-a-cpu-sampler-for-silverlight.aspx
EnableRedrawRegions is a good first hit - make sure that the ProgressBar is only triggering itself to be redrawn (not the MSI). Ø Silverlight Spy showed an infinite amount of LayoutUpdated being fired, but I can't seem to get more information. Interesting, as this is not expected. Hmm, if the issue is really the progressbar, then a couple of things: - The progressbar will take less cycles if other things are happening. As in, the animation takes 40% CPU and happens at 60fps because nothing else is going on on your screen. - If even with the above, you really want to lower the CPU: o Add the indeterminate progressbar to the tree when it is actually shown... o another idea, but should be used carefully, is, if only the progressbar is should be painting, to switch the maxframerate to 15... and then switch it back to 60fps when the progressbar is gone. -Seema From: [email protected] [mailto:[email protected]] On Behalf Of Ross Jempson Sent: Wednesday, October 21, 2009 7:30 PM To: ozSilverlight Subject: RE: Determining what is causing high CPU usage I was contemplating a somewhat similar thing a few days ago. Except I want to look for potential memory leaks. I have used a couple of tools in the past, including the Ants profiler. However I discovered that the Silverlight framework doesn't implement a profiling interface as per the full framework. http://www.red-gate.com/supportcenter/Content.aspx?p=ANTS%20Performance%20Profiler&c=knowledgebase\ANTS_Performance_Profiler\KB200809000306.htm It is a bit of a tangent, but you could also try an idea suggested on this list by Seema Ramchandani. You can set <param name="EnableRedrawRegions" value="true" /> in your plugin object. When I did this I was surprised to notice that a background image I hadn't considered was being constantly redrawn when a unrelated animation was in progress on the same screen. From: John OBrien [mailto:[email protected]] Sent: Thursday, 22 October 2009 11:41 AM To: 'ozSilverlight' Subject: Determining what is causing high CPU usage Hey guys does anyone have a good technique to determine exactly what is causing high CPU usage inside a Silverlight control? The example today was a ProgressBar with IsIndeterminate set to true causes a MultiScaleImage control to go crazy (40-70% CPU). Even worse is even after you hide the progressbar it never stops. <MultiScaleImage Source="GeneratedImages/dzc_output.xml" /> <ProgressBar x:Name="progress" IsIndeterminate="True" Width="400" Height="25" /> My current solution is simple trial and error to find the cause, and then remove the offending control. Silverlight Spy showed an infinite amount of LayoutUpdated being fired, but I can't seem to get more information. Any good tools out there? I've found ProcessExplorer is awesome for monitoring the CPU usage / memory. John. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
_______________________________________________ ozsilverlight mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
