Is LINQ a valid option?
We (my team) are about to start development of a mission critical project, one of the sub-systems of this project is a Windows service. This service will be a backbone of the entire system and has to respond as per mission critical standard.
This service will contain many lists to minimize database interaction and to gain performance, I开发者_开发问答 am estimating average size of a list to be 250,00 under normal circumstances.
Is it a good idea to use LINQ to query data from these queues, or should I follow my original plan of creating indexed list?
Indexed List is a custom implementation of Idictionary
, which will work like an index and will have many performance oriented features such as MRU, Index rebuilding, etc.
Before rolling your own solution, you might want to look at i4o, an indexed LINQ to Objects provider.
Otherwise, it sounds like applying your own indexing may well be worthwhile - but do performance tests first. "Mission critical" is often about reliability more than performance - if LINQ to Objects performs well enough, why not use it?
Even if you do end up writing your own collections, you should consider making them "LINQ queryable" in some fashion (which will depend on the exact nature of the collections)... it's nice to be able to write LINQ queries, even if it's not against vanilla LINQ to Objects.
精彩评论