|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
2 Performance Questionsparent 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! 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. Why dont you try the hierargrid?
http://www.denisbauer.com/ASPNETControls/HierarGrid.aspx Sonu Kapoor Blog: http://www.kapoorsolutions.com/blog >-----Original Message----- time. Also, the>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 >viewstate then needs to be de-serialized on the server each round-trip>adding extra overhead. hide the cell.> >I am assuming that a postback takes place - this is probably true >unless you are using some clever javascript to show and > the "down arrow" is>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 >clicked. already done so) or> >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 >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 from elsewhere inthe stored >proc from query analyser etc... If slowness is caused >the code, then that is a separate matter. E.g. are you> >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. Show quoteHide quote >accessing the server on a slow connection? > >Hope this helps. > >. > 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.
Default Paging
e.Item.DataItem Background of datagrid Inserting Text before the Numberic Page numbers in paging Changing paging look moving data from a page to an other page dataView Need some hints before starting to change a page Disable button in datagird on condition Problem editing checkbox template column |
|||||||||||||||||||||||