惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
N
Netflix TechBlog - Medium
罗磊的独立博客
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
MongoDB | Blog
MongoDB | Blog
雷峰网
雷峰网
Recent Announcements
Recent Announcements
The Cloudflare Blog
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog
博客园 - Franky
博客园 - 三生石上(FineUI控件)
T
Tenable Blog
A
Arctic Wolf
www.infosecurity-magazine.com
www.infosecurity-magazine.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Threat Research - Cisco Blogs
D
Docker
Y
Y Combinator Blog
博客园 - 叶小钗
PCI Perspectives
PCI Perspectives
P
Privacy & Cybersecurity Law Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
NISL@THU
NISL@THU
C
Cyber Attacks, Cyber Crime and Cyber Security
GbyAI
GbyAI
Application and Cybersecurity Blog
Application and Cybersecurity Blog
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
Spread Privacy
Spread Privacy
L
LangChain Blog
N
News and Events Feed by Topic
量子位

博客园 - Ferry

ASP.NET网站权限设计实现(三)——套用JQuery EasyUI列表显示数据、分页、查询 ASP.NET网站权限设计实现(二)——角色权限绑定 ASP.NET读取网络图片并在页面上显示 ASP.NET网站权限设计实现(一)——使用PowerDesigner进行数据库设计 Visual Studio 2010 架构图之用例图(UML Use Case Diagram) ASP.NET MVC3 新的视图引擎(View Engine) 一个德国人图解中西文化差异(值得一看) 微软AJAX CDN(内容分发网络) 注册使用GAC—Global Assembly Cache(.NET) ASP.NET 递归将分类绑定到 TreeView - Ferry 新浪微博PC客户端(DotNet WinForm版)——功能实现分解介绍 新浪微博PC客户端(DotNet WinForm版)—— 初探 C#:30行数据插入到数据库中的效率测试-一行行执行、构造SQL一次执行、SqlBulkCopy C#使用GMAIL群发带附件邮件的例子 ASP.NET Web 应用开发实战快速上手系列 3—C#面向对象编程纲要-类 ASP.NET带进度条多文件上传 ASP.NET4.0中客户端ID的生成 学习使用NHibernate2.1.0Beta1(续七)— 单例模式 ASP.NET Web 应用开发实战快速上手系列 2——C#基础
在高优先级下运行应用程序
Ferry · 2010-10-19 · via 博客园 - Ferry

你是否注意到,当你在高优先级下运行应用程序是,应用程序运行得特别快(这也视你运行什么样的应用程序而定)。拿WinRar做例子测试,你会发现解压缩要比正常优先级下快一些,但是也有一些应用程序性能要比正常优先级下性能差,所以在确定这样设置之前,先做测试,看是否能够比正常优先级下得到更高的性能。

如果你现在可以自由的更改应用程序的代码,你可以用下面代码做测试:

       C#: 

System.Diagnostics.Process myProcess = System.Diagnostics.Process.GetCurrentProcess();
myProcess.PriorityClass 
= System.Diagnostics.ProcessPriorityClass.High;

      VB:

Dim myProcess As System.Diagnostics.Process = _
        System.Diagnostics.Process.GetCurrentProcess()
myProcess.PriorityClass 
= System.Diagnostics.ProcessPriorityClass.High

你要做的就是在加载窗体前或任何你想改变进程优先级的地方使用此代码就可以了。 

还有一种非常简单的解决方案:运行应用程序时使用/<priority>选项,选项列表如下:

  1. realtime(实时)
  2. high(高)
  3. normal(正常)
  4. low(低)
  5. abovenormal (Windows 2000 only)(高于正常)
  6. belownormal (Windows 2000 only) (低于正常)

要做到这一点,你所要做的就是使用start命令,语法如下:

 start /{priority} {application}

例如:

start /high winword
start /low notepad
"C:\YourDirectory" start /realtime YourApplication.exe
or even from 
run command
cmd /start /low calc

 同时发布于us178.com  CSDN.NET

 原文:CodeProject