Profiling Silverlight 4

牧云@^-^@ 提交于 2019-12-25 09:42:32

问题


I have a Silverlight page that displays100+ user controls in a ScrollViewer (around 50% of the controls are visible at once, depending on browser resolution).

When I scroll using the ScrollViewer, scrolling is sluggish and one of my 4 CPU cores goes to 100% (and stays there as long as I keep moving a scrollbar).

I wanted to profile the application to better understand where the time is being spent following the instructions on this MSDN Blog. Like one of the commenters, I get the error

No Call Tree Data Is Available.

when I open the .vsp file.

I run my profiling session with this batch file:

call vsperfclrenv /sampleon 
set CORECLR_ENABLE_PROFILING=1
set CORECLR_PROFILER=%COR_PROFILER%
call vsperfcmd /start:sample /output:myProfile.vsp
call vsperfcmd /launch:"c:\Program Files (x86)\Internet Explorer\iexplore.exe" /timer:100000
echo Browse to http://localhost:9567/MyTestPage.aspx#/Home
call vsperfcmd /shutdown

Echo Before viewing, turn on the symbols server in VS2010 through: Tools-->Options-->Debugging-->Symbols-->check microsoft symbols server.
Echo Open .vsp file in VS2010

One blog commentor suggested the problem is due to a 64-bit version of vsperfcmd. While I'm running Windows 7 64-bit, vsperfcmd suggests that it's an x86 build:

vsperfcmd

Microsoft (R) VSPerf Command Version 10.0.40219 x86

What am I missing to profile my user code?


回答1:


Have you tried running this in an administrator console window - I have recently noticed that I can't profile (code coverage) silverlight applications unless I am running under an Administrator account i.e. starting a console window with "run as administrator"



来源:https://stackoverflow.com/questions/7310853/profiling-silverlight-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!