Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Put buffering and Response.Flush to good use

Total Hit ( 2368)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


IIS5 enables buffering by default, therefore all the output from your ASP is actually sent to the browser only when the page completes its processing. In many cases this approach improves the overall processing speed, and indirectly makes for a more scalable site. However, buffering has two minor defects: (1) the end user might perceive a loss in speed, because she won't see any output until the page is complete, and (2) buffered output has to be maintained on the server, therefore your ASP application is going to take more memory than it would do if buffering were disabled. On server machines with an inadequate amount of memory, large HTML pages can reduce the overall performance.

Fortunately, you can solve both problems with judicious use of the Response.Flash method, that lets you flush the output buffer periodically when sending a large amount of data back to the client. For example, if you are sending back to the client data from thousands of records, you might flush the buffer every 100 records, so that the end user sees some results earlier and you don't tax the server's memory.

Note, however, that you must take special precautions when your output is an HTML table, because many browsers won't render the table until the closing
is received. For more info, see the link below.


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

New Comment
 


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.