一个应用程序占用30%的cpu时间意味着什么? [英] An application takes 30% cpu time means what?

查看:350
本文介绍了一个应用程序占用30%的cpu时间意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序占用30%的cpu时间,应该减少到1-2%的CPU时间.我该如何实现呢?

An application takes 30% cpu time it should come down to 1-2 % CPU Time .how can i accompalish this?

推荐答案

这意味着需要30% % 时间. :-)您可以通过在某些地方插入System.Threading.Thread.Sleep来使其减少任何百分比. (不要在任何UI线程中这样做!)

您还可以通过降低线程优先级来做到这一点(在几乎所有情况下都不建议这样做;除非您非常了解自己在做什么,否则请避免使用它.)

我认为您现在已经了解我了:减少应用程序的CPU使用率通常是没有意义的.在某些应用程序中,人们努力利用更多的CPU(也不是很合理的标准).您需要不同的东西:及时进行更多工作,这是不同的. CPU时间从来都不是真正的目标.

—SA
It means it takes 30% time. :-) You can make it any percent less by inserting System.Threading.Thread.Sleep in some places. (Don''t do it in any UI thread!)

You can also do it by reducing thread priority (not recommended in almost all cases; avoid it unless you understand very well what are you doing).

I think you understand me right by now: reducing CPU usage by application normally makes no sense. In some application, people struggle for utilizing more CPU (also not very reasonable criteria). You need different thing: make more work in time, and this is something different. CPU time is never a real goal.

—SA


这篇关于一个应用程序占用30%的cpu时间意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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