Performance in C#: Querying DataTable or XDocument with Linq
I have quite a few datatables that are transported between processes by converting them to XML.
My question is, is it quicker to read the XML in开发者_JAVA百科to a dataset / datatable on the other side and querying that (with LINQ) or should I just leave the XML and query with Linq?
Does the overhead in converting from XML to data table justify any search performance increases a data table may have?
The queries are mainly just finding a primary key.
If the number of queries per table is small, then my guess is that it is faster to query the XML. Reverse that advice if there are numerous queries.
精彩评论