3

I have created a small "Dynamic Data Web Site" using the Entity Framework. I've no experience with this really, but it looks very interesting. Anyway, I have a single table being displayed on a single web page. The table contains over 21000 rows and the page limits me to 10 records per page, which is all fine.

My problem is that the page is incredibly slow. I'm guessing that maybe every row in the table is being loaded whenever I try to navigate, but I can't be sure this is the cause.

How can I increase the performance of the page? I want to be able to click through pages of results quickly and easily. It currently takes more than 60 seconds to click to the next set of results.

JMc
  • 971
  • 2
  • 17
  • 26
  • Hard to say without seeing your code... – fvu Jun 23 '11 at 10:47
  • There's no code to show you really. I just followed the walk-through here: http://msdn.microsoft.com/en-us/library/cc488469.aspx, pointing the EDM at my own database rather than the one provided in the MS example. – JMc Jun 23 '11 at 10:50
  • 1
    I'm having much the same issue except I'm using a larger database with a number of Foreign Keys. If I pause the web application execution during the delay it usually is waiting on the PopulateListControl(DropDownList1) call in Filters/ForeignKey.ascx. – Daniel Ballinger Jul 26 '11 at 00:44

2 Answers2

2

this is usually caused by filters on a table where the filter has MANY rows you could fix this using the Autocomplete filter which prefilters the data base what the user types in.

You can get this filter and other from ny NuGet package Dynamic Data Custom Filters

Wizzard
  • 924
  • 5
  • 9
  • The NuGet package link is broken for me. Try http://nuget.org/List/Packages/NotAClue.DynamicData.CustomFilters or http://csharpbits.notaclue.net/2011/06/second-nuget-package-for-dynamic-data.html – Daniel Ballinger Jul 27 '11 at 20:37
  • fixed link to my package on NuGet – Wizzard Nov 11 '11 at 16:15
0

Also try having a look in it using Ayende's EFProf. It is a commercial product but it has a free 30 day trial. I can sometimes point out silly things you are doing and suggest some ways to optimise your data access

Daniel Powell
  • 8,143
  • 11
  • 61
  • 108
  • I actually have that already but hadn't been using it here. I will take a look at it to see what it reports. Thanks. – JMc Jun 26 '11 at 16:16