views:

93

answers:

1

We are finding that for a large sets of data server controls (with the amount of postbacks) they do often times result in a very slow performance. While we don't want to do all the business logic in Javascript, we would like to speed things up.

What were your solutions/ideas? AJAX?

+1  A: 

Two easiest places in ASP.NET to start and get the biggest gains:

  • Reduce ViewState. The ViewState can very quickly become unwieldy and even plain massive. I've seen developers inadvertently create pages that push down 20mb+ of ViewState. Every communication between client and server has to transmit that data. Here is a great roundup on how-tos for using the ViewState in a smart way.

  • Use the HttpRuntime cache. Once you fetch your data from wherever you're getting it (SQL or whatnot), store it in the cache. Always check the cache for the data before attempting to re-fetch it from the original source. The HttpRuntime cache is extremely fast.

    The cache link above has some good basic examples on how to add and remove items with the cache.

Rex M
Thanks! I was more concerned with web server - client trips rather than database trips.Once I fetch the data I can store it in the server object/ session or whatever. My questions is more to do with the ViewState I think. For example, when GridView posts back, this might create slow performance.
gnomixa