WPF应用程序占用了很高的CPU,但内存稳定 [英] wpf app is taking high cpu but consistant memory

查看:1348
本文介绍了WPF应用程序占用了很高的CPU,但内存稳定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个WPF应用程序,虽然该应用程序处于活动状态(表示未最小化),但占用的CPU很高(平均大于30),但内存(私有字节)却是稳定的,没有增加.它是稳定的在最小化应用程序的同时使用cpu 为0或介于0到4之间.当应用程序处于活动状态时,并不是每台Windows 7计算机上的CPU使用情况都一致.我的是Intel Core i7 -2600 CPU @ 3.40GHz.

I have a WPF application.While the Application is active(means not minimized) then it is taking very high CPU(avg is more than 30) but memory(private bytes) is consistant.It is not increasing.It is stable.While the application is minimized then the cpu usage is either 0 or between 0 to 4.while the application is active the cpu usage is not consistant in every windows 7 machine.Mine is Intel Core i7 -2600 CPU @3.40GHz.

当我在进程浏览器中检查它以找到占用CPU的perticuler线程时,我发现了以下线程(我无法在此贴上屏幕截图)

When I checked it in process explorer to find the perticuler thread which is taking the CPU i found the following thread(i could not able to attach screenshot in this post)

wpfgfx_v0400.dll!MilCompositionEngine_InitializePartitionManager + 0x374  > 30(cpu)

wpfgfx_v0400.dll!MilCompositionEngine_InitializePartitionManager+0x374  > 30(cpu)

一个具有垂直功能的wpf dll占用了更多的cpu.请告诉我原因.为什么这个dll占用了如此多的cpu.我在代码中做错了什么吗(请记住cpu的用法在所有情况下都不一致m/c).请告知什么可能 该问题的可能解决方案.我需要解决此问题.系统中是否存在与驱动程序有关的问题?

One wpf dll with perticular function is taking the more cpu.Can you please tell me the reason.Why this dll is taking this much cpu.Have I done anything wrong in my code(remember the cpu usage is not consistant in all m/c).Please advice what  could be the possible solution for this issue.I need to fix this.Is there any driver related issue in my system ?

请让我知道是否需要其他信息.

Please let me know if you need any other information.

推荐答案

1.我建议您在Win7中安装最新的修补程序,然后尝试使用最新的.NET Framework.最新的修补程序提高了性能,并修复了一些已知问题.

1. I would suggest you install the latest hotfixes in Win7 and try latest .NET Framework. The latest hotfixes have improved the performance and fixed some known issues.

2.我认为您可以找到以下有趣的链接:

2. I think that you can find interesting the following links:

WPF Performance Suite

另一方面,情节提要,AnimationTimeline和AnimationClock允许您指示HandoffBehavior,并且在某些情况下可能会导致性能问题.有关如何避免性能问题的更多信息,您可以查看以下内容 文档部分:

On the other hand, Storyboard, AnimationTimeline and AnimationClock allows you to indicate the HandoffBehavior and in some cases it might cause a performance issue. For more information on how to avoid performance issues, you could take a look at the following documentation section:

HandoffBehavior ,请参阅备注"部分.

HandoffBehavior, see the Remarks section.

玩得开心!

此致


这篇关于WPF应用程序占用了很高的CPU,但内存稳定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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