ADO.NET Data Services Performance Issues

September 25, 2008
No Comments.

Silverlight Logo
It has come to my attention that my current examples using ADO.NET Data Services are performing very badly. I was using that example as anecdotal evidence that Data Services performed slower than the Web Service counterparts.  I don’t think this is accurate.  I am working on some performance comparisons that I will share on my blog once Silverlight 2 goes into a full release so I can be sure that the numbers reflect a real-world release.

The issue seems to surround a bone-headed query I was making:

var qry = from p in TheContext.Products.Expand("Supplier").Expand("Category")
          orderby p.ProductName
          select p;

This means for every product I was retrieving its related Category and Supplier.  The problem is that I was duplicating this data (since some products shared Categories and Suppliers).  Not efficient at all.

When I re-release these examples when Silverlight 2 ships, I will be hosting the examples on CodePlex.  Watch here for announcements on the release of the code, new versions of the examples as well as the performance comparisons coming soon.