I'm working with Azure Storage Tables and RIA services to create a, rather basic, Silverlight UI to access and manage some of the data.
Nothing too fancy: a data model with some annotations, and a DomainDataSource
, make it all a breeze.
With one minor exception.
When I have a really, really large table, then loading it, at least when I'm doing this on the Development Fabric and even using the LoadSize
parameter of the DomainDataSource
, takes a LOT of time.
My guess is that the following thing happens:
This is OK for conserving bandwidth, but it's far from optimal when you consider that one must pay for processing power used by an Azure-based application.
Is there any way to optimise the RIA service queries? Is it even at all possible to use Take()
and Skip()
methods on Azure Storage Tables?
EDIT: I am using WCF RIA Services SP1 Beta, and have followed several tutorials on Silverlight with RIA services (which are all very very similar). Combining the two, I'm simply wondering if loading a large table into Silverlight can be improved by adding the LoadSize
parameter. At the moment it seems to conserve bandwidth only (as the correct amount of rows is being sent to the Silverlight client), but the whole process still uses as much CPU time as it does for the whole table.
Have you tried RIA Services SP1 Beta? It includes TableDomainService that handles all the logic by managing entities in the specified Azure Storage account. Also, you can inspect traffic between your service and Azure Storage using Fiddler to find out what the problem is.
References:
EDIT: As Kyle McClellan mentioned below in the comment, this problem really exists in WCF RIA Services SP1 Beta.