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

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

Subscribe on YouTube