I have a problem with my Silverlight 4 application that needs to load various lists at startup. Pretty much what http://drc.ideablade.com/xwiki/bin/view/Documentation/parallel-async-coroutines
describes. I created a coroutine method with a series of 'yield return' calls to ExecuteAsync, and none of them use data returned by any of the others. I then launch the method by calling Coroutine.StartParallel.
Despite following the example, my startup code still seems to take a long time. Doing analysis, I put some debugging information into the client on the entities Querying/Queried, as well as in a stub server query interceptor ExecuteQuery method (before and after a call to the .base.ExecuteQuery). The resulting debug information seems to indicate that, on my system, although the 'Query' event gets called for all of them at once, the query interceptor is getting called for each query one at a time, and the 'Queried' on the client is being fired between each, which would seem to mean that the server is processing them synchronously, despite the client having launched them using a parallel coroutine.
I was able to verify with Fiddler that the EntityServer.svc is getting called multiple times all at once (for all the queries), so I'm wondering if there's a setting for the server side DevForce code that controls the number of allowed concurrent connections from the client? Could that be what's preventing the queries from being run concurrently server side?
On a related note, I've been trying to reduce the complexity of the queries so they individually execute faster, and was I was wondering about a few cases where I have an inheritance hierarchy in the EDMX, which is represented as a table per class (which I have no choice about). So there is, for example, a class/table defining fields that are wanted on a particular business object, and a series of descendant class/tables for each of half a dozen supported field types.
Is there any way to do a query that could get just the items (or even a specific item) of a specific descendant type, rather than having the default SQL being generated which tries to join together all the child tables? If for example I only wanted a list of all the 'text' field objects, and didn't care about other types. I've tried using OfType<TextField>() in the queries, but this doesn't have any effect on the generated SQL.