分析 Silverlight 4 [英] Profiling Silverlight 4

查看:61
本文介绍了分析 Silverlight 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 Silverlight 页面,它在 ScrollViewer 中显示 100 多个用户控件(大约 50% 的控件一次可见,具体取决于浏览器分辨率).

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).

当我使用 ScrollViewer 滚动时,滚动速度很慢,我的 4 个 CPU 核心之一达到 100%(只要我一直移动滚动条,就会保持在那里).

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).

我想对应用程序进行概要分析,以便按照此 MSDN 博客.就像其中一位评论者一样,我收到了错误

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.

当我打开 .vsp 文件时.

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

一位博客评论者认为该问题是由 64 位版本的 vsperfcmd 引起的.当我运行 Windows 7 64 位时,vsperfcmd 表明它是 x86 版本:

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 命令版本 10.0.40219 x86

Microsoft (R) VSPerf Command Version 10.0.40219 x86

我缺少什么来配置我的用户代码?

What am I missing to profile my user code?

推荐答案

您是否尝试过在管理员控制台窗口中运行它 - 我最近注意到我无法分析(代码覆盖)silverlight 应用程序,除非我在管理员帐户,即使用以管理员身份运行"启动控制台窗口

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"

这篇关于分析 Silverlight 4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆