當(dāng)前位置:首頁(yè) > 芯聞號(hào) > 充電吧
[導(dǎo)讀]技巧16:在任何可能時(shí)使用Server.Transfer,而不要用Response.Redirect  Response.Redirect告訴瀏覽器請(qǐng)求另一個(gè)不同的頁(yè)面,這常常用于引導(dǎo)用戶到登錄頁(yè)面或

技巧16:在任何可能時(shí)使用Server.Transfer,而不要用Response.Redirect

  Response.Redirect告訴瀏覽器請(qǐng)求另一個(gè)不同的頁(yè)面,這常常用于引導(dǎo)用戶到登錄頁(yè)面或者出錯(cuò)處理頁(yè)面。由于重定向強(qiáng)迫了一個(gè)新頁(yè)面請(qǐng)求,結(jié)果是瀏覽器必須要與Web服務(wù)器循環(huán)2次,并且Web服務(wù)器必須處理一個(gè)額外的請(qǐng)求。IIS5.0引進(jìn)了一個(gè)新功能Server.Transfer,它執(zhí)行在同一服務(wù)器上的頁(yè)面?zhèn)鬏敚@將避免額外的瀏覽器-Web服務(wù)器的數(shù)據(jù)循環(huán),形成良好的系統(tǒng)性能,對(duì)于用戶也有較好的響應(yīng)時(shí)間。

技巧17:避免使用服務(wù)器變量

  存取服務(wù)器變量導(dǎo)致Web站點(diǎn)建立一個(gè)特殊的請(qǐng)求并收集所有的服務(wù)器變量,而并不是你要求的那個(gè)變量。這類似于在文件夾中取回一個(gè)特殊的文件,要想取回一個(gè)文件,就得首先獲取所在文件夾的信息。

  不要存取非法的Request對(duì)象(比如Request("Data")),對(duì)于那些不在Request.Cookies、Request.Form、Request.QueryString或者Request.ClientCertificate中的項(xiàng)目,隱含就指向了Request.ServerVariables變量,而這些變量要比其他集合對(duì)象慢得多。

技巧18:調(diào)整Web服務(wù)器

  有幾個(gè)IIS調(diào)整參數(shù)可以提高站點(diǎn)性能。比如,對(duì)于IIS4.0,我們經(jīng)常發(fā)現(xiàn)提高ASP ProcessorThreadMax參數(shù)能夠產(chǎn)生重大的效果,特別是在那些要等待后臺(tái)資源比如數(shù)據(jù)庫(kù)或中間件產(chǎn)品的站點(diǎn)。在IIS5.0中,你可以發(fā)現(xiàn)調(diào)整ASP線程通道要比調(diào)整AspProcessorThreadMax效果更佳。

最佳的配置設(shè)定取決于應(yīng)用程序代碼、支持的硬件設(shè)備以及客戶端的工作量。發(fā)現(xiàn)最佳配置的唯一方法就是測(cè)試。

相關(guān)參考資源
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 Monitoring Events in Distributed Applications Using Visual Studio Analyzer by Mai-lan Tomsen Books Professional Active Server Pages 3.0, Wrox Press. (Especially Chapter 26: Optimizing ASP Performance, by George Reilly and Matthew Gibbs) Microsoft Internet Information Services 5.0 Resource Guide (bundled with Windows 2000 Server Resource Kit, Microsoft Press. Microsoft Internet Information Server Resource Kit (for IIS 4.0), Microsoft Press. Programming Distributed Applications with COM and Microsoft Visual Basic 6.0 by Ted Pattison, Microsoft Press. Effective COM by Don Box, Keith Brown, Tim Ewald, and Chris Sells; Addison-Wesley. Developing Web Usability: The Practice of Simplicity by Jakob Nielsen, New Riders. ASP Web sites Microsoft TechNet for IIS LearnASP.com 4GuysFromRolla.com 15Seconds.com AspToday.com Asp101.com AspLists.com. Many specialized mailing lists including: Fast Code! ASP Advanced Not Newbie State Management Scalability Visual Basic Components XML C++/ATL Component Building UseIt.com: Web Usability ASP style ASP Best Practices by George Reilly ASP Quick Lessons by Charles Carroll Planning for ASP by John Meade ASP Guidelines by J.D. Meier XML Inside XML Performance by Chris Lovett Inside MSXML3 Performance by Chris Lovet

本站聲明: 本文章由作者或相關(guān)機(jī)構(gòu)授權(quán)發(fā)布,目的在于傳遞更多信息,并不代表本站贊同其觀點(diǎn),本站亦不保證或承諾內(nèi)容真實(shí)性等。需要轉(zhuǎn)載請(qǐng)聯(lián)系該專欄作者,如若文章內(nèi)容侵犯您的權(quán)益,請(qǐng)及時(shí)聯(lián)系本站刪除。
換一批
延伸閱讀

9月2日消息,不造車的華為或?qū)⒋呱龈蟮莫?dú)角獸公司,隨著阿維塔和賽力斯的入局,華為引望愈發(fā)顯得引人矚目。

關(guān)鍵字: 阿維塔 塞力斯 華為

倫敦2024年8月29日 /美通社/ -- 英國(guó)汽車技術(shù)公司SODA.Auto推出其旗艦產(chǎn)品SODA V,這是全球首款涵蓋汽車工程師從創(chuàng)意到認(rèn)證的所有需求的工具,可用于創(chuàng)建軟件定義汽車。 SODA V工具的開(kāi)發(fā)耗時(shí)1.5...

關(guān)鍵字: 汽車 人工智能 智能驅(qū)動(dòng) BSP

北京2024年8月28日 /美通社/ -- 越來(lái)越多用戶希望企業(yè)業(yè)務(wù)能7×24不間斷運(yùn)行,同時(shí)企業(yè)卻面臨越來(lái)越多業(yè)務(wù)中斷的風(fēng)險(xiǎn),如企業(yè)系統(tǒng)復(fù)雜性的增加,頻繁的功能更新和發(fā)布等。如何確保業(yè)務(wù)連續(xù)性,提升韌性,成...

關(guān)鍵字: 亞馬遜 解密 控制平面 BSP

8月30日消息,據(jù)媒體報(bào)道,騰訊和網(wǎng)易近期正在縮減他們對(duì)日本游戲市場(chǎng)的投資。

關(guān)鍵字: 騰訊 編碼器 CPU

8月28日消息,今天上午,2024中國(guó)國(guó)際大數(shù)據(jù)產(chǎn)業(yè)博覽會(huì)開(kāi)幕式在貴陽(yáng)舉行,華為董事、質(zhì)量流程IT總裁陶景文發(fā)表了演講。

關(guān)鍵字: 華為 12nm EDA 半導(dǎo)體

8月28日消息,在2024中國(guó)國(guó)際大數(shù)據(jù)產(chǎn)業(yè)博覽會(huì)上,華為常務(wù)董事、華為云CEO張平安發(fā)表演講稱,數(shù)字世界的話語(yǔ)權(quán)最終是由生態(tài)的繁榮決定的。

關(guān)鍵字: 華為 12nm 手機(jī) 衛(wèi)星通信

要點(diǎn): 有效應(yīng)對(duì)環(huán)境變化,經(jīng)營(yíng)業(yè)績(jī)穩(wěn)中有升 落實(shí)提質(zhì)增效舉措,毛利潤(rùn)率延續(xù)升勢(shì) 戰(zhàn)略布局成效顯著,戰(zhàn)新業(yè)務(wù)引領(lǐng)增長(zhǎng) 以科技創(chuàng)新為引領(lǐng),提升企業(yè)核心競(jìng)爭(zhēng)力 堅(jiān)持高質(zhì)量發(fā)展策略,塑強(qiáng)核心競(jìng)爭(zhēng)優(yōu)勢(shì)...

關(guān)鍵字: 通信 BSP 電信運(yùn)營(yíng)商 數(shù)字經(jīng)濟(jì)

北京2024年8月27日 /美通社/ -- 8月21日,由中央廣播電視總臺(tái)與中國(guó)電影電視技術(shù)學(xué)會(huì)聯(lián)合牽頭組建的NVI技術(shù)創(chuàng)新聯(lián)盟在BIRTV2024超高清全產(chǎn)業(yè)鏈發(fā)展研討會(huì)上宣布正式成立。 活動(dòng)現(xiàn)場(chǎng) NVI技術(shù)創(chuàng)新聯(lián)...

關(guān)鍵字: VI 傳輸協(xié)議 音頻 BSP

北京2024年8月27日 /美通社/ -- 在8月23日舉辦的2024年長(zhǎng)三角生態(tài)綠色一體化發(fā)展示范區(qū)聯(lián)合招商會(huì)上,軟通動(dòng)力信息技術(shù)(集團(tuán))股份有限公司(以下簡(jiǎn)稱"軟通動(dòng)力")與長(zhǎng)三角投資(上海)有限...

關(guān)鍵字: BSP 信息技術(shù)
關(guān)閉
關(guān)閉