Note that there are some explanatory texts on larger screens.

plurals
  1. POSlow linq enumeration
    text
    copied!<p>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. </p> <p>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.</p> <p>On to the issue. When getting larger amounts of data, the enumeration process "<strong>ToList()</strong>" 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.</p> <p>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?</p> <p>Additional Info:</p> <p>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. </p> <p>I also created a basic object which I set as the return type for my object, consisting mostly of quick property definitions such as : <Pre><code> public Guid Id {get; set;} </code></Pre></p> <p>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?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload