how to improve performance ?

Discussion in 'ASP .Net Datagrid Control' started by Joe Abou Jaoude, Apr 6, 2005.

  1. hi,

    I m using a datagrid with AutoGenerateColumns="false",
    and a template column composed by a checkbox and a label bound to the
    database.
    However in some cases, the query returns more than a thousand records
    which make the display very very slow to dislay.
    Of course one of the options is using pagination, although this decision
    is not in my authority (i can only suggest)...
    so I was thinking what could be some other options that can improve the
    performance.

    What i tought of, is using an htmlTable and adding the rows dynamically
    by iterating through a datatable or a datareader (whatever is faster). I
    thought this would be faster and also would make the web page size
    smaller since the datagrid uses big names like
    "MyDataGrid__ctl83_Label1"
    Does anyone have an idea about if that would be a good solution or not?

    my second question: the html page size is reaching 700-800 KB, which is
    huge i guess. Is there a page size that it's not recommended to exceed
    and what is it ?

    Any information would be appreciated
    regards



    *** Sent via Developersdex http://www.developersdex.com ***
     
    Joe Abou Jaoude, Apr 6, 2005
    #1
    1. Advertising

  2. Joe Abou Jaoude

    Brock Allen Guest

    > What i tought of, is using an htmlTable and adding the rows
    > dynamically
    > by iterating through a datatable or a datareader (whatever is faster).


    Nope -- this is essentially what the DataGrid' already doing for you. If
    you (or your boss) wants to show thousands of rows on a page, then this is
    the behavior you're going to see.

    > my second question: the html page size is reaching 700-800 KB, which
    > is huge i guess. Is there a page size that it's not recommended to
    > exceed and what is it ?


    It's too big when your users think that your page is slow to load (assuming
    size of the page causes the slow load time).

    -Brock
    DevelopMentor
    http://staff.develop.com/ballen
     
    Brock Allen, Apr 6, 2005
    #2
    1. Advertising

  3. Joe Abou Jaoude

    Elton Wang Guest

    To set the datagrid's EnableViewState to false can improve
    its performance. But if you want its pagingation, it's
    better to turn on its viewstate, unless you implement your
    own paging logic.

    HTH

    Elton Wang



    >-----Original Message-----
    >hi,
    >
    >I m using a datagrid with AutoGenerateColumns="false",
    >and a template column composed by a checkbox and a label

    bound to the
    >database.
    >However in some cases, the query returns more than a

    thousand records
    >which make the display very very slow to dislay.
    >Of course one of the options is using pagination,

    although this decision
    >is not in my authority (i can only suggest)...
    >so I was thinking what could be some other options that

    can improve the
    >performance.
    >
    >What i tought of, is using an htmlTable and adding the

    rows dynamically
    >by iterating through a datatable or a datareader

    (whatever is faster). I
    >thought this would be faster and also would make the web

    page size
    >smaller since the datagrid uses big names like
    >"MyDataGrid__ctl83_Label1"
    >Does anyone have an idea about if that would be a good

    solution or not?
    >
    >my second question: the html page size is reaching 700-

    800 KB, which is
    >huge i guess. Is there a page size that it's not

    recommended to exceed
    >and what is it ?
    >
    >Any information would be appreciated
    >regards
    >
    >
    >
    >*** Sent via Developersdex http://www.developersdex.com

    ***
    >.
    >
     
    Elton Wang, Apr 7, 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. hb
    Replies:
    2
    Views:
    499
  2. Marc Twain
    Replies:
    5
    Views:
    4,808
    Andrew Thompson
    Jan 15, 2004
  3. Nishi Bhonsle
    Replies:
    1
    Views:
    918
    Thomas Weidenfeller
    Jul 20, 2004
  4. Roy Smith
    Replies:
    10
    Views:
    834
    Krzysztof Rzymkowski
    Nov 24, 2003
  5. Replies:
    3
    Views:
    304
Loading...

Share This Page