2 Performance Questions

Discussion in 'ASP .Net Datagrid Control' started by Roy, Mar 2, 2005.

  1. Roy

    Roy Guest

    1. I have a nested datagrid. When one clicks the "down arrow" on a
    parent grid record, the nested grid drops down. If you've done this
    before, you know what I mean. My question: from my perspective, all I
    am doing when the "down arrow" is clicked is making a column in the
    parent grid visible (the default is invisible). The data for the child
    grid has already been pulled during page_load. It would seem to me that
    there should be virtually no delay when the down arrow is clicked. The
    child grid should simply appear instantaneously. This does not happen.
    Sometimes it takes up to 7 or 8 seconds for the child grid to "load."
    What is going on here? Is a postback occurring? How can I shorten the
    time it takes for the child grid to appear???


    2. Does anyone have any tips for speeding up the "update" function of a
    datagrid? When a user clicks "Update" after editing a field, sometimes
    it takes up to 15 seconds to do the deed. Yes, I have indexes on SQL
    Server, and yes, I'm using stored procs. Any other tips?

    Thanks!
    Roy, Mar 2, 2005
    #1
    1. Advertising

  2. Roy

    Samuel Kim Guest

    1. If your datagrid contains a large amount of data, then your view
    state will be considerably large. This can be checked by viewing the
    source code from your browser. If this data is significantly large,
    then the page download as well as postback will take time. Also, the
    viewstate then needs to be de-serialized on the server each round-trip
    adding extra overhead.

    I am assuming that a postback takes place - this is probably true
    unless you are using some clever javascript to show and hide the cell.

    If the above is the issue, then you will have to not load all the
    nested grids on page load, but should load them as the "down arrow" is
    clicked.

    2. Very strange and this may have to do with the way you are
    configured.
    I recommend that you enable trace (if you have not already done so) or
    run the code in debug mode to see which step takes up the time. If it
    is the actual SQL call that takes up the time, then you would look at
    the network connectivity, compare other db calls, running the stored
    proc from query analyser etc... If slowness is caused from elsewhere in
    the code, then that is a separate matter.

    With the two issues above, you may like to have a look at the network
    speed - as both symptoms can be caused by a slow network. E.g. are you
    accessing the server on a slow connection?

    Hope this helps.
    Samuel Kim, Mar 3, 2005
    #2
    1. Advertising

  3. Roy

    Sonu Kapoor Guest

    Why dont you try the hierargrid?

    http://www.denisbauer.com/ASPNETControls/HierarGrid.aspx

    Sonu Kapoor
    Blog: http://www.kapoorsolutions.com/blog


    >-----Original Message-----
    >1. If your datagrid contains a large amount of data, then

    your view
    >state will be considerably large. This can be checked by

    viewing the
    >source code from your browser. If this data is

    significantly large,
    >then the page download as well as postback will take

    time. Also, the
    >viewstate then needs to be de-serialized on the server

    each round-trip
    >adding extra overhead.
    >
    >I am assuming that a postback takes place - this is

    probably true
    >unless you are using some clever javascript to show and

    hide the cell.
    >
    >If the above is the issue, then you will have to not load

    all the
    >nested grids on page load, but should load them as

    the "down arrow" is
    >clicked.
    >
    >2. Very strange and this may have to do with the way you

    are
    >configured.
    >I recommend that you enable trace (if you have not

    already done so) or
    >run the code in debug mode to see which step takes up the

    time. If it
    >is the actual SQL call that takes up the time, then you

    would look at
    >the network connectivity, compare other db calls, running

    the stored
    >proc from query analyser etc... If slowness is caused

    from elsewhere in
    >the code, then that is a separate matter.
    >
    >With the two issues above, you may like to have a look at

    the network
    >speed - as both symptoms can be caused by a slow network.

    E.g. are you
    >accessing the server on a slow connection?
    >
    >Hope this helps.
    >
    >.
    >
    Sonu Kapoor, Mar 3, 2005
    #3
  4. Roy

    Roy Guest

    Thanks for the input. It's appreciated.

    In reference to #1, if I understand what you're saying correctly, when
    I click the "down arrow" the page reloads in it's entirety? That sucks.

    In reference to #2 comment...both the web server and sql server are on
    the same machine. While it has a couple gigs of RAM, I suspect this may
    be a cause of the performance hits.
    Roy, Mar 3, 2005
    #4
    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. jm
    Replies:
    1
    Views:
    498
    alien2_51
    Dec 12, 2003
  2. Sammy
    Replies:
    2
    Views:
    444
    Sammy
    Feb 15, 2005
  3. Brian Patterson

    Trivial performance questions

    Brian Patterson, Oct 17, 2003, in forum: Python
    Replies:
    25
    Views:
    644
    Alex Martelli
    Oct 20, 2003
  4. Eric S. Johansson

    performance measurement questions

    Eric S. Johansson, Jul 6, 2004, in forum: Python
    Replies:
    2
    Views:
    289
    Eric S. Johansson
    Jul 6, 2004
  5. Software Engineer
    Replies:
    0
    Views:
    309
    Software Engineer
    Jun 10, 2011
Loading...

Share This Page