Product Reviews

Search Collections with ComponentOne LiveLINQ

LiveLINQ speeds up LINQ queries against in-memory collections by an order of magnitude -- but before you buy it, make sure you have the problems it solves.

ComponentOne LLC claims that its LiveLINQ product will speed up queries by orders of magnitude -- and, based on my testing, that's true. The tool works equally well in C# and Visual Basic, though all the provided sample code is in C#.

What the LiveLINQ libraries provide are some new extension methods for LINQ queries, chiefly the AsIndexed method, as used in this example:

var res = from o in nw.Order_Details. 
             AsIndexed()
           where o.Discount.Indexed() 
             == .05
	        select o;

Assuming that the collection has more than a few objects in it, the first time you run this query, you'll get your results back in about half the time as you would without LiveLINQ. Subsequent queries against the Discount method will run in one-tenth the time. Really.

LiveLINQ won't work with every collection that LINQ will work with. You can't use the LiveLINQ extensions on a List, for instance. However, LiveLINQ will work with DataSets and their related objects, the LINQ to XML collections, BindingList (or anything that implements the IBindingList interface), ObservableCollection and others.

LiveLINQ also provides a new collection called IndexedCollection that provides a database-type View. For instance, you can run a LINQ query against an Indexed-Collection and bind the result to some Data-View. If you later add items to the collection that meet the criteria for the query, the DataView will automatically display the new entries.


[Click on image for larger view.]
Figure 1. LiveLINQ comes with an extensive set of examples, including several that demonstrate how to work with DataSets (though not with the Entity Framework).

Other Caveats
ComponentOne says on its Web site that LiveLINQ works with the Entity Framework, but that's all it says. You should be aware, for instance, that a LiveLINQ View isn't live relative to data in the database, just to in-memory changes. LiveLINQ doesn't follow typical component pricing: It costs $1,000 per developer without the Platinum Support package (discounts are available). This is $200 more than the entire ComponentOne

ASP.NET AJAX component package. But, if you need to solve response-time problems with large object collections, or hope to improve scalability by using caching, LiveLINQ looks like an outstanding solution.

LiveLINQ

ComponentOne LLC
Web:
componentone.com
Phone: 800-858-2739
Price: $1,000 (single developer without Platinum Support)
Quick Facts: Extensions to LINQ that speed up queries through indexing and providing database-like views.
Pros: Makes LINQ queries against collections such as DataSets run an order of magnitude faster.
Cons: Doesn't work with all Microsoft .NET Framework collections; pricing is a little steep.



About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube