EditOverview
Index for Objects (i4o) allows developers to create indexed collections that query much faster than the out of the box queries do over existing collections. i4o is an open source project available under the CDDO license.
EditUsage
i4o allows developers to tag properties of arbritrary objects with the [Indexable()] tag. For example:
using i4o;
class Student{
private string _firstName;
private string _lastName;
private string _gradePointAverage;
[Indexable()]
public string FirstName{
get{ return _firstName; }
}
}
Once the appropriate properties are tagged as indexable, developers can use the specialized generic collection, IndexableCollection
, to instantiate a collection of Student that, when queried using LINQ operators, will execute an index aware query rather than the default sequential search.
IndexableCollection derives from Collection, the preferred class to subclass from when writing your own custom collections. Thus, the typical usage pattern will be to create a class, say, Students in this example, that is defined as such:
using i4o;
class Students : IndexableCollection<Student> {
//Student collection stuff goes here
}
From this point, any linq query that uses an indexable field will use the index rather than doing a sequential search, resulting in order of magnituide performance increases for queries using the index.
EditDevelopment Status
i4o is in currently in beta. The where and join operators have been implemented for IndexableCollection, with the contains operator coming soon.
EditDownload
The current version of i4o, as well as source code, is available under the CDDO license, here:
i4o Download Page
EditContact
For more information, or help with i4o, please contact Aaron Erickson AaronE@magenic.com.