WPF 动画/UI 功能性能和基准测试 [英] WPF animation/UI features performance and benchmarking

查看:59
本文介绍了WPF 动画/UI 功能性能和基准测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为一些业务线的东西做一个相对较小的概念验证,其中包含一些花哨的 WPF UI 工作.甚至没有太疯狂,我已经看到在使用许多我认为是首先考虑 WPF 用于 UI 构建的主要原因的功能时性能非常差.我在这里问了一个问题,为什么我的动画在第一次运行时就停止了,最后我发现一个非常简单的 UserControl 花了将近半秒钟来构建它的可视化树.我能够解决这个症状,但是初始化一个简单的控件需要这么长时间的事实真的让我感到困扰.现在,我正在使用和不使用 DropShadowEffect 测试我的动画,结果是白天和黑夜.一个微妙的阴影让我的控件看起来更好,但它完全破坏了动画的平滑度.让我什至不从字体渲染开始.当控件有一堆渐变画笔和一个阴影时,我的动画计算使文本模糊了大约整整一秒钟,然后慢慢进入焦点.

I'm working on a relatively small proof-of-concept for some line of business stuff with some fancy WPF UI work. Without even going too crazy, I'm already seeing some really poor performance when using a lot of the features that I thought were the main reason to consider WPF for UI building in the first place. I asked a question on here about why my animation was being stalled the first time it was run, and at the end what I found was that a very simple UserControl was taking almost half a second just to build its visual tree. I was able to get a work around to the symptom, but the fact that it takes that long to initialize a simple control really bothers me. Now, I'm testing my animation with and without the DropShadowEffect, and the result is night and day. A subtle drop shadow makes my control look so much nicer, but it completely ruins the smoothness of the animation. Let me not even start with the font rendering either. The calculation of my animations when the control has a bunch of gradient brushes and a drop shadow make the text blurry for about a full second and then slowly come into focus.

所以,我想我的问题是,是否有已知的研究、博客文章或文章详细说明了当前版本的 WPF 中哪些功能对关键业务应用程序构成威胁.效果(即 DropShadowEffect)、渐变画笔、关键帧动画等是否会对渲染质量(或者这些东西的组合)产生太大的负面影响?WPF 4.0 的最终版本会修正其中的一些问题吗?我读过 VS2010 测试版有一些相同的问题,它们应该在最终版本中得到解决.是因为 WPF 本身的改进还是因为一半的应用程序将使用以前的技术重建?

So, I guess my question is if there are known studies, blog posts, or articles detailing which features are a hazard in the current version of WPF for business critical applications. Are things like Effects (ie. DropShadowEffect), gradient brushes, key frame animations, etc going to have too much of a negative effect on render quality (or maybe the combinations of these things)? Is the final version of WPF 4.0 going to correct some of these issues? I've read that VS2010 beta has some of these same issues and that they are supposed to be resolved by final release. Is that because of improvements to WPF itself or because half of the application will be rebuilt with the previous technology?

推荐答案

你看过微软的文章吗?

这篇关于WPF 动画/UI 功能性能和基准测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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