ASP.NET Speed up DataView sorting/paging
- by rlb.usa
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.