LINQ AsParallel().AsOrdered() is slow

  • Thread starter Thread starter Sudip_inn
  • Start date Start date
S

Sudip_inn

Guest
i know PLINQ is fast but when i will iterate in huge data say 10,00,000 data and if i use AsOrdered() then it will be slower compared with LINQ normal join without PLINQ?

var JoinResult2 = (from p in dt.AsEnumerable().AsParallel().AsOrdered()
join t in dtTax.AsEnumerable().AsParallel().AsOrdered()
on p.Field<int>("Tax Id") equals t.Field<int>("Tax Id") into pj
from r in pj.DefaultIfEmpty()
select new
{
ProductName = p.Field<string>("Product Name"),
BrandName = p.Field<string>("Brand Name"),
ProductCategory = r == null ? "" : r.Field<string>("Product Category"),
TaxCharge = r == null ? 0 : r.Field<int>("Charge")
}).ToList().ToDataTable();

Continue reading...
 
Back
Top