I currently have a search that allows me to filter products down, for a number of combinations.
For instance, I might start with all products, then select by category, or popular stores – it simply crunches the data each time a filter is selected, showing totals for each type of filter and the possible selections still available. The user could do this several times to get to their final list.
I’m working with EF for the first time and the search will have approx 10k products in to start with.
The main difference in using EF as opposed to Linq2Sql or SP is that it not only gets the data but materializes them at the same time, Whilst a grab of page data takes 60ms the 10k products takes 4s. Whilst this doesn’t sound a lot, I can’t do it each time a user refreshes a search.
I could cache the data, but this does limit the application somewhat in terms of an upper threshold or server farms, although it will fit the bill now.
I was wondering however if there are any better way of achiveing this other than creating a bespoke SP. I don’t want to use javascript because it is fundamental to the working of the site.
Anyone have any ideas?
Refactored code so that navigation properties are not needed. This reduces number of tables queried from 3 to 1 and gives acceptable result.