当前位置: 首页 > 图文教程 > 网络编程 > ASP > 如何增强ASP程序性能(4)

ASP
利用ASP将HTML格式数据传输给Excel 的技巧
用ASP CSS实现随机背景
用ASP实现在线文章翻译的功能
动态网页爱好者来看:Asp过滤HTML的函数
自动去除字符中含有html代码的几个ASP函数
用ASP对网页进行简单的保护
ASP网页开发过程中的几个小技巧
ASP动态网页制作中使用SQL语句的方法
ASP开发中存储过程应用全接触
入门:初学ASP动态网页制作常用错误处理
ASP动态网页下UTF-8页面乱码的解决方法
小技巧:解决ASP脚本运行超时的方法
动态网页制作技术ASP开发中的常见问题
动态网页技术ASP日期和时间函数示例
ASP程序实现保存参数值的分页功能
用ASP寻找到真实IP地址的方法
ASP中文显示解决技巧及创建对象方法
ASP实例:Asp 防止网页频繁刷新一法
将ASP动态网页转换成HTM静态页面的方法
技巧:得到刚刚插入的记录的自动编号值一例

如何增强ASP程序性能(4)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 14 ::
收藏到网摘: n/a

  技巧16:在任何可能时使用Server.Transfer,而不要用Response.Redirect

  Response.Redirect告诉浏览器请求另一个不同的页面,这常常用于引导用户到登录页面或者出错处理页面。由于重定向强迫了一个新页面请求,结果是浏览器必须要与Web服务器循环2次,并且Web服务器必须处理一个额外的请求。IIS5.0引进了一个新功能Server.Transfer,它执行在同一服务器上的页面传输,这将避免额外的浏览器-Web服务器的数据循环,形成良好的系统性能,对于用户也有较好的响应时间。

技巧17:避免使用服务器变量

  存取服务器变量导致Web站点建立一个特殊的请求并收集所有的服务器变量,而并不是你要求的那个变量。这类似于在文件夹中取回一个特殊的文件,要想取回一个文件,就得首先获取所在文件夹的信息。

  不要存取非法的Request对象(比如Request("Data")),对于那些不在Request.Cookies、Request.Form、Request.QueryString或者Request.ClientCertificate中的项目,隐含就指向了Request.ServerVariables变量,而这些变量要比其他集合对象慢得多。

技巧18:调整Web服务器

  有几个IIS调整参数可以提高站点性能。比如,对于IIS4.0,我们经常发现提高ASP ProcessorThreadMax参数能够产生重大的效果,特别是在那些要等待后台资源比如数据库或中间件产品的站点。在IIS5.0中,你可以发现调整ASP线程通道要比调整AspProcessorThreadMax效果更佳。

最佳的配置设定取决于应用程序代码、支持的硬件设备以及客户端的工作量。发现最佳配置的唯一方法就是测试。

相关参考资源

Optimizing ASP scripts
Developing Scalable Web Applications
Got Any Cache? by Nancy Winnick Cluts
Maximizing the Performance of Your Active Server Pages by Nancy Winnick Cluts
15 Seconds: Performance Section
Enhancing Performance in ASP - Part I by Wayne Plourde
When is Better Worse? Weighing the Technology Trade-Offs by Nancy Winnick Cluts
Speed and Optimization Resources by Charles Carroll
Tuning IIS
The Art and Science of Web Server Tuning with Internet Information Services 5.0
Leveraging ASP in IIS 5.0 by J.D. Meier
Tuning IIS 4.0 for High Volume Sites by Michael Stephenson
Tuning Internet Information Server Performance by Mike Moore
Navigating the Maze of Settings for Web Server Performance Optimization by Todd Wanke
Managing Internet Information Server 4.0 for Performance by Hans Hugli
ADO and SQL Server
Top Ten Tips: Accessing SQL Through ADO and ASP by J.D. Meier
Improve the Performance of your MDAC Application by Suresh Kannan
Pooling in the Microsoft Data Access Components by Leland Ahlbeck and Don Willits
SQL Server: Performance Benchmarks and Guides
Improving the Performance of Data Access Components with IIS 4.0 by Leland Ahlbeck
Microsoft Data Access Components (MDAC) and ActiveX Data Objects (ADO) Performance Tips by Leland Ahlbeck
Microsoft SQL Server 7.0 Practical Performance Tuning and Optimization - The Server Perspective by Damien Lindauer
Microsoft SQL Server 7.0 Practical Performance Tuning and Optimization - The Application Perspective by Damien Lindauer
Accessing Recordsets over the Internet by Dino Esposito
ASP components and threading models
ASP Component Guidelines by J.D. Meier
Q243548: INFO: Design Guidelines for VB Components under ASP
Threading Models Explained by Nancy Winnick Cluts
So Happy Together? Using ActiveX components with Active Server Pages by Nancy Winnick Cluts
Developing Active Server Components with ATL by George Reilly
Agility in Server Components by Neil Allain
Building High-Performance Middle-Tier Components with C++ by Jon Flanders
Active Server Pages and COM Apartments by Don Box
House of COM: Active Server Pages by Don Box
House of COM: Contexts by Don Box
House of COM: Performance Trade-offs of the Windows 2000 Component Execution Environment by Don Box
Building COM Components That Take Full Advantage of Visual Basic and Scripting by Ivo Salmre
Component Design Principles for MTS
Dictionary components
Creating a Page Cache Object by Robert Coleridge
Abridging the Dictionary Object: The ASP Team Creates a Lookup-Table Object by Robert Carter
Caprock Dictionary
Site Server Commer