2 Performance Questions

R

Roy

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!
 
S

Samuel Kim

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

Roy

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top