Note that there are some explanatory texts on larger screens.

plurals
  1. POOptimizing Azure Storage queries for RIA services
    text
    copied!<p>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.</p> <p>Nothing too fancy: a data model with some annotations, and a <code>DomainDataSource</code>, make it all a breeze.</p> <p>With one minor exception.</p> <p>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 <code>LoadSize</code> parameter of the <code>DomainDataSource</code>, takes a LOT of time.</p> <p>My guess is that the following thing happens:</p> <ul> <li>The Silverlight client asks the RIA service for, say, 100 first rows of the table.</li> <li>Since Azure Data Storage queries are extremely basic, the service retrieves all the rows from the data storage, and THEN performs Take(100) on that set.</li> <li>Client gets the first 100 rows.</li> </ul> <p>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.</p> <p>Is there any way to optimise the RIA service queries? Is it even at all possible to use <code>Take()</code> and <code>Skip()</code> methods on Azure Storage Tables?</p> <p>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 <code>LoadSize</code> 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.</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