Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Speeding up page display

Reply
Thread Tools

Speeding up page display

 
 
Troy
Guest
Posts: n/a
 
      01-21-2004
Hello all,

I was wondering if there is a way to speed up the rendering of a web page
to the client browser... In my case, I am retrieving about 60 - 100 rows of
data from an SQL Server and I wish to display these rows the client as I am
retrieving them (while looping). I get the results from SQL and populate a
dataset, then I loop through the dataset and add the data to an
<asp:tablecell> object on the aspx page. Part of the data I retrieve is a
URL which points to an image on the server (the image is not stored in SQL,
just the path) of which I add then add an image control to the web page. I
believe it is in this area that takes most of the time.

It looks like the client/browser waits untill the entire contents of the
table are populated (60 - 100 table cells) before it will render the page.
My question is: Is there a way to tell the browser to start showing the
images as my code loops through the dataset? I have tried setting the
response.bufferoutput to false, but it actually did not start displaying
each row as it was added - it waited till they all were added and then
rendered the page and it took longer than response.bufferoutput = true
configuration.

I was thinking of using response.flush() after every 10 or 20 loops
through the data set.... will this work and receive an increase in
performance? Thanks for any help with this matter!!!

Regards,

Troy


 
Reply With Quote
 
 
 
 
Troy
Guest
Posts: n/a
 
      01-22-2004
No tips??!?!!??

"Troy" <> wrote in message
news:...
> Hello all,
>
> I was wondering if there is a way to speed up the rendering of a web

page
> to the client browser... In my case, I am retrieving about 60 - 100 rows

of
> data from an SQL Server and I wish to display these rows the client as I

am
> retrieving them (while looping). I get the results from SQL and populate

a
> dataset, then I loop through the dataset and add the data to an
> <asp:tablecell> object on the aspx page. Part of the data I retrieve is a
> URL which points to an image on the server (the image is not stored in

SQL,
> just the path) of which I add then add an image control to the web page.

I
> believe it is in this area that takes most of the time.
>
> It looks like the client/browser waits untill the entire contents of the
> table are populated (60 - 100 table cells) before it will render the page.
> My question is: Is there a way to tell the browser to start showing the
> images as my code loops through the dataset? I have tried setting the
> response.bufferoutput to false, but it actually did not start displaying
> each row as it was added - it waited till they all were added and then
> rendered the page and it took longer than response.bufferoutput = true
> configuration.
>
> I was thinking of using response.flush() after every 10 or 20 loops
> through the data set.... will this work and receive an increase in
> performance? Thanks for any help with this matter!!!
>
> Regards,
>
> Troy
>
>



 
Reply With Quote
 
 
 
 
George Ter-Saakov
Guest
Posts: n/a
 
      01-22-2004
1. Browser (IE) displays table only once it has all HTML for that table.
So even if you are spiting out HTML using Response.Flush browser will not
show the table until tag </table> is received.

2. When exactly do you call Response.Flush?
When you adding Row object to the Table object it does not produce HTML
right away.
HTML will be generated only on when RenderControl method is called.
And it's called almost at the end of the request.

So my point is that you are just wasting time by calling Response.Flush
since no HTML was generated.


---------------

If you want to have such behavior you got to
1. No table
2. Use inline code as you would in regular ASP (Response.Write) to produce
output.

George.

"Troy" <> wrote in message
news:...
> No tips??!?!!??
>
> "Troy" <> wrote in message
> news:...
> > Hello all,
> >
> > I was wondering if there is a way to speed up the rendering of a web

> page
> > to the client browser... In my case, I am retrieving about 60 - 100

rows
> of
> > data from an SQL Server and I wish to display these rows the client as I

> am
> > retrieving them (while looping). I get the results from SQL and

populate
> a
> > dataset, then I loop through the dataset and add the data to an
> > <asp:tablecell> object on the aspx page. Part of the data I retrieve is

a
> > URL which points to an image on the server (the image is not stored in

> SQL,
> > just the path) of which I add then add an image control to the web page.

> I
> > believe it is in this area that takes most of the time.
> >
> > It looks like the client/browser waits untill the entire contents of

the
> > table are populated (60 - 100 table cells) before it will render the

page.
> > My question is: Is there a way to tell the browser to start showing the
> > images as my code loops through the dataset? I have tried setting the
> > response.bufferoutput to false, but it actually did not start displaying
> > each row as it was added - it waited till they all were added and then
> > rendered the page and it took longer than response.bufferoutput = true
> > configuration.
> >
> > I was thinking of using response.flush() after every 10 or 20 loops
> > through the data set.... will this work and receive an increase in
> > performance? Thanks for any help with this matter!!!
> >
> > Regards,
> >
> > Troy
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have one ASP.NET Page. It's for display customer information. Now I want this page to handle the function "Edit" and "Display", Is it possible? Benny Ng ASP .Net 1 01-04-2007 08:00 PM
[ot]Valid excuse for speeding? JaR MCSE 9 01-05-2005 08:23 PM
Speeding Up A Page joethis ASP General 4 10-15-2004 08:44 PM
speeding up data transfer? Devin Panchal Wireless Networking 1 09-06-2004 05:46 PM
Need some hints on speeding up Spamtrap Perl 1 08-11-2004 11:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57