Results 1 to 2 of 2

Thread: Buffers?!

  1. #1
    Shawn Berg - IWM Guest

    Default Buffers?!

    I have a page that is pulling data from a SQL Server 7 database and populating a template. This template stores quite a bit of data as it is a restaurant menu. Since there is a great deal if information, I would like to know how I can have the page display contents while it is loading the rest of the page. I have tried setting Response.Buffer=True at the very beginning of the page, but then my Option Explicit line reports an error. If I comment out the Option Explicit line the Response.Buffer=True, and Response.Flush commands throughout the page seem to work. It does not seem any faster however. Can somebody please help me do this the right way? Thanks.<BR><BR>Shawn<BR>Innovative WebMedia<BR>http://www.iwebmedia.net<BR>

  2. #2
    SPG Guest

    Default RE: Buffers?!

    Well, what you really want is a response.buffer = false, as per<BR><BR>&#060;% option explicit <BR> response.buffer = false %&#062;<BR><BR>The response.buffer needs to be called before anything can be written to the buffer (or lack thereof); option explicit must happen before [almost] any code.<BR><BR>In action, the response.buffer is kind of like ordering some stuff and having it delivered UPS -- generally it&#039s more cost effective (since you don&#039t have to pay the UPS repeatedly) to have everything shipped at once [response.buffer = true], but if there&#039s issues with something you ordered, then you may want multiple shipments despite the cost [response.buffer = false].<BR><BR>[Network Theory bit -- the afore mentioned cost is in terms of TCP/IP wrappers for your data which are put on anything which goes out through onto your network. If you have all of your data together (thus, fewer packets), then there&#039s fewer wrappers to be dealing with and directing, hence, less "cost" to the network.]<BR><BR>So if you&#039re seeing marked improvements in favor of not buffering your code -- or perhaps no improvement at all in the amount of time it takes to start loading a page -- then your code is probably problematic somewhere inside (like a database connection, perhaps?).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts