R
Ron
Dear all
I have an asp.net application that streams PDFs to the browser in 64kb
chunks, looping through until all the PDF is streamed out. Here's a few lines
to help you get the picture (at bottom of this post)
My question is that I'm going to measure the time that this code takes to
run and log it to see how things are performing. However, what will this
measurement actually be representing?
a) The time it takes for the whole data of the PDF to reach the client.
b) same as a) but additional time it takes for the Adobe Reader to load and
display (which is usually slow)
c) Something else, i'm missing the point?
Any help of thoughts greatly appreciated here! Thanks all.
ps. if the answer is b) is it actually possible to measure a)?
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", System.Convert.ToString(document.Size));
Response.AddHeader("Accept-Header", System.Convert.ToString(document.Size));
byte[] buffer = new byte[documentStreamer.BlobBufferSize];
while ((buffer = documentStreamer.StreamBytes()).Length != 0)
{
//Write straight back to browser....
Response.OutputStream.Write(buffer, 0, buffer.Length);
Response.Flush();
}
documentStreamer.Close();
Response.End();
I have an asp.net application that streams PDFs to the browser in 64kb
chunks, looping through until all the PDF is streamed out. Here's a few lines
to help you get the picture (at bottom of this post)
My question is that I'm going to measure the time that this code takes to
run and log it to see how things are performing. However, what will this
measurement actually be representing?
a) The time it takes for the whole data of the PDF to reach the client.
b) same as a) but additional time it takes for the Adobe Reader to load and
display (which is usually slow)
c) Something else, i'm missing the point?
Any help of thoughts greatly appreciated here! Thanks all.
ps. if the answer is b) is it actually possible to measure a)?
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/pdf";
Response.AddHeader("content-length", System.Convert.ToString(document.Size));
Response.AddHeader("Accept-Header", System.Convert.ToString(document.Size));
byte[] buffer = new byte[documentStreamer.BlobBufferSize];
while ((buffer = documentStreamer.StreamBytes()).Length != 0)
{
//Write straight back to browser....
Response.OutputStream.Write(buffer, 0, buffer.Length);
Response.Flush();
}
documentStreamer.Close();
Response.End();