ASP.NET Speed up DataView sorting/paging

Posted by rlb.usa on Stack Overflow See other posts from Stack Overflow or by rlb.usa
Published on 2010-03-16T21:51:22Z Indexed on 2010/03/17 0:01 UTC
Read the original article Hit count: 172

Filed under:
|
|

I have a page in ASP.NET where I'm using a Repeater to display a record listing. But it's slow as molasses, I've been tasked with speeding it up (sorting,paging).

I've got it set up as follows:

  • When user enters page, grab all of the data from the database (500 records, up to 4 relation'ed records)
  • Store it all in Application["MyDataView"]
  • On sort or paging, simply use the data view's internal sort/page method (no db calls) and rebind.

I understand that databases can take time to query, but simply to have the DataView call it's sort method (no db calls) takes 10ish seconds, that's an alarmingly slow.

Two questions:

  • Why is it taking so long?
  • How can I speed it up? A gridview is not possible.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about faster