Speeding up page display

Discussion in 'ASP .Net' started by Troy, Jan 21, 2004.

  1. Troy

    Troy Guest

    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
    Troy, Jan 21, 2004
    #1
    1. Advertising

  2. Troy

    Troy Guest

    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
    >
    >
    Troy, Jan 22, 2004
    #2
    1. Advertising

  3. 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
    > >
    > >

    >
    >
    George Ter-Saakov, Jan 22, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Spamtrap

    Need some hints on speeding up

    Spamtrap, Aug 11, 2004, in forum: Perl
    Replies:
    1
    Views:
    360
    Jim Gibson
    Aug 12, 2004
  2. OHM

    Speeding up pages

    OHM, May 24, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    342
  3. =?Utf-8?B?TWF0dA==?=

    Speeding up a DataGrid with XML

    =?Utf-8?B?TWF0dA==?=, May 20, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    456
    =?Utf-8?B?TWF0dA==?=
    May 20, 2005
  4. Harald Hein

    Speeding up Swing application

    Harald Hein, Oct 27, 2003, in forum: Java
    Replies:
    6
    Views:
    506
    Daniel Dyer
    Oct 28, 2003
  5. joethis

    Speeding Up A Page

    joethis, Oct 15, 2004, in forum: ASP General
    Replies:
    4
    Views:
    86
    dlbjr
    Oct 15, 2004
Loading...

Share This Page