I've been working on a silverlight application which generates various graphs. It requires a bit of number crunching as well as getting a decent amount of data from the database.
For my db communications I created a web service which uses Linq2SQL. To overcome the issue of my web service blowing up, I chunk up the data which results in sometimes having 3 web service calls to get it all.
On to the issue. When getting larger amounts of data, the enumeration process "ToList()" is taking a good few seconds, which adds up to a longer than desired load time. The typical duration for my query is about 1500 according to the SQL Profiler. The ToList() call can take up to 4 seconds for 1000 records, which seems extreme.
My main question is, is there anything that can be done to speed up this process? Or perhaps is there a better way to get large amounts of data from the db to a silverlight app?
Additional Info:
My linq reference is hard coded into a partial class of my data context. This is due to an awkward stored procedure whose return type wouldn't play nice with the dbml file.
I also created a basic object which I set as the return type for my object, consisting mostly of quick property definitions such as :
public Guid Id {get; set;}
The follow up question is, when defining a linq stored procedure call and return types, are there any attributes which help speed up the process or am I fine just linking it to a very basic object?