Long Page Load -- Lots of Data -- A problem

Discussion in 'ASP .Net' started by Harry Whitehouse, Apr 24, 2005.

  1. Hi!

    Today I coded a small ASPNET page which accepts a 5 digit ZIP code and will
    return all the street names in that ZIP code. You can try it out here:

    http://65.203.54.72/FindAddress/FindAddress.aspx

    The server side reads a special USPS database and creates a Dataview which
    in turn is bound to a datagrid.

    I've found one problem thusfar. If you put in a very urban ZIP code
    (10016 -- NYC) and no street name, the query takes about 30 seconds to
    render -- but it does come up eventually. There are about 11,100 entires in
    the grid - which is likely a worst-case. If you then input another ZIP
    (try your own) and press Go again, one immediately gets a "page not found"
    screen.

    If you push the refresh button on the brower and try again with the new ZIP,
    it will work OK.

    Similarly, if you don't look up a "stressful query", you can examine any
    number of ZIP's in succession without a problem.

    I'm wondering what's going on. Granted, the data download for 11,000
    entries is pretty substantial. Is there some sort of connection timeout
    that I'm encountering? Is there a setting in the CONFIG file that I need
    to tweak?

    I'm running IIS5 and .NET 2003. My browser is IE 6 with all the updates.

    Any thoughts would be appreciated!

    TIA

    Harry
     
    Harry Whitehouse, Apr 24, 2005
    #1
    1. Advertising

  2. Hi Harry,

    It's not a good idea to use a DataSet for large numbers of records because
    it builds a memory based structure. First the structure gets built, then the
    DataView performs some analysis to get the sorted view - all very slow on
    even a few thousand records. You might want to consider using a DataReader
    and pull the data in the right order out of the database.

    Finally you say you have a grid with 11,000 items? Who's going to actually
    read all of this data? You really need to think about presenting this
    differently. Most of the slowness problem is likely the browser trying to
    render 11,000 columns.

    I'd do some testing to see where the slowness is - in the retrieval or in
    the rendering and then address that particular problem. With what you say I
    bet the bulk of the problem is in the rendering in the browser.


    +++ Rick ---

    --

    Rick Strahl
    West Wind Technologies
    www.west-wind.com
    www.west-wind.com/weblog

    "Harry Whitehouse" <> wrote in message
    news:%...
    > Hi!
    >
    > Today I coded a small ASPNET page which accepts a 5 digit ZIP code and
    > will
    > return all the street names in that ZIP code. You can try it out here:
    >
    > http://65.203.54.72/FindAddress/FindAddress.aspx
    >
    > The server side reads a special USPS database and creates a Dataview which
    > in turn is bound to a datagrid.
    >
    > I've found one problem thusfar. If you put in a very urban ZIP code
    > (10016 -- NYC) and no street name, the query takes about 30 seconds to
    > render -- but it does come up eventually. There are about 11,100 entires
    > in
    > the grid - which is likely a worst-case. If you then input another ZIP
    > (try your own) and press Go again, one immediately gets a "page not
    > found"
    > screen.
    >
    > If you push the refresh button on the brower and try again with the new
    > ZIP,
    > it will work OK.
    >
    > Similarly, if you don't look up a "stressful query", you can examine any
    > number of ZIP's in succession without a problem.
    >
    > I'm wondering what's going on. Granted, the data download for 11,000
    > entries is pretty substantial. Is there some sort of connection timeout
    > that I'm encountering? Is there a setting in the CONFIG file that I need
    > to tweak?
    >
    > I'm running IIS5 and .NET 2003. My browser is IE 6 with all the updates.
    >
    > Any thoughts would be appreciated!
    >
    > TIA
    >
    > Harry
    >
    >
     
    Rick Strahl [MVP], Apr 24, 2005
    #2
    1. Advertising

  3. When I tried your page and "view source" during the process, I see the page
    is actually transferring and there is overhelming of viewstate data in it.
    Consider disabling viewstate for the grid can do some help. (Probably
    there's much time spent on encoding the viewstate, add trace="true" to your
    "page" tag to see the time and size spent on it)

    "Harry Whitehouse" <> ¦b¶l¥ó
    news:% ¤¤¼¶¼g...
    > Hi!
    >
    > Today I coded a small ASPNET page which accepts a 5 digit ZIP code and

    will
    > return all the street names in that ZIP code. You can try it out here:
    >
    > http://65.203.54.72/FindAddress/FindAddress.aspx
    >
    > The server side reads a special USPS database and creates a Dataview which
    > in turn is bound to a datagrid.
    >
    > I've found one problem thusfar. If you put in a very urban ZIP code
    > (10016 -- NYC) and no street name, the query takes about 30 seconds to
    > render -- but it does come up eventually. There are about 11,100 entires

    in
    > the grid - which is likely a worst-case. If you then input another ZIP
    > (try your own) and press Go again, one immediately gets a "page not

    found"
    > screen.
    >
    > If you push the refresh button on the brower and try again with the new

    ZIP,
    > it will work OK.
    >
    > Similarly, if you don't look up a "stressful query", you can examine any
    > number of ZIP's in succession without a problem.
    >
    > I'm wondering what's going on. Granted, the data download for 11,000
    > entries is pretty substantial. Is there some sort of connection timeout
    > that I'm encountering? Is there a setting in the CONFIG file that I need
    > to tweak?
    >
    > I'm running IIS5 and .NET 2003. My browser is IE 6 with all the updates.
    >
    > Any thoughts would be appreciated!
    >
    > TIA
    >
    > Harry
    >
    >
     
    Lau Lei Cheong, Apr 25, 2005
    #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. Mad Scientist Jr
    Replies:
    7
    Views:
    1,201
    Emma Gumbdough
    Jun 30, 2004
  2. roni
    Replies:
    1
    Views:
    667
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tp?=
    Aug 30, 2005
  3. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    749
    Eric Sosman
    Jul 8, 2003
  4. brad
    Replies:
    9
    Views:
    398
    Bruno Desthuilliers
    Jun 19, 2008
  5. coolneo
    Replies:
    9
    Views:
    223
    coolneo
    Jan 30, 2007
Loading...

Share This Page