在 Silverlight 中,当 CPU 不可用时,什么会导致帧速率下降?
我们实现了拖放功能,可以很好地简单地表示我们正在拖动的内容。
拖放发生在具有很多元素的视图上 拖动时,CPU 不会达到最高值,无论您尝试拖动项目多长时间或多快,CPU 都会稳定地保持在 10 以下,但帧速率会急剧下降,从高于 60 降至低于 10 EnableRedraw
清楚地表明,只有我们拖动的项目正在重绘,而不是整个页面。
我如何找出导致性能问题的原因?
We have implemented a drag and drop feature that shows a nice simple representation of what we are dragging.
The drag and drop happens on a view that has a lot of elements
While dragging, the CPU doesn't go to the roof it stays steady below 10 no matter how long or how fast you try to drag the item, but the framerate drops dramatically from above 60 to less than 10.
EnableRedraw clearly shows that only the item we drag is being redrawn, not the entire page.
How can I find out what is causing that performance issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们正在使用 telerik 拖放管理器,在拖动时,该组件会引发事件来检查是否可以拖放 100 个元素深度。解决方案是,在开始拖动时,在重元素上将 IsHitTestVisible 设置为 false,直到他们将其配置为可配置(或者如果您有源代码,则您可以自行修改)。
这对我们有用:)。即使在包含大量元素的页面上,拖动也非常流畅
We are using the telerik dragdropmanager, and while dragging, the component is raising events to check if you can drop through 100 elements deep. Solution, until they make that configurable (or that you modify it yourself if you have the source code) is to set IsHitTestVisible to false on heavy elements when you start dragging.
this worked for us :). Dragging is very fluid, even on pages with a lot of elements