如何增強ASP程式效能(4)

來源:互聯網
上載者:User
程式|效能 2000-08-14· 編譯:甘冀平·Yesky

技巧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 Commerce Edition includes a dictionary component
Session state
Q175167: HOWTO: Persisting Values Without Sessions
Q157906: HOWTO: How To Maintain State Across Pages with VBScript
XML-based Persistence Behaviors Fix Web Farm Headaches by Aaron Skonnard
House of COM: Stateless Programming by Don Box
Performance and scalability
Blueprint for Building Web Sites Using the Microsoft Windows DNA Platform
Server Performance and Scalability Killers by George Reilly
Microsoft Visual Studio Scalability Center
Fitch & Mather Stocks 2000
Tuning the FMStocks Application
High-Performance Visual Basic Apps by Ken Spencer
Duwamish Books, Phase 4
Top Windows DNA Performance Mistakes and How to Prevent Them by Gary Geiger and Jon Pulsipher
Building from Static HTML to High-Performance Web-Farms by Shawn Bice
Tools
Microsoft Web Application Stress Tool
I Can? Stress It Enough -- Load Test Your ASP Application by J.D. Meier
Windows DNA Performance Kit



相關文章

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。