Hi,
I'm iterating over an anonymous type with about 1000 elements.
The question here is how is it possible that my loop takes almost 3 seconds to complete while what inside the loops happens takes less than 1 ms. With a thousand elements i figure the loop must finish within the second, not 3.
Is there a way to make it iterate faster?
// takes 1ms to complete
var x = tt.Where(p => p.Methods.Count() > 0 && p.PerWeek != this.Project.WorkDaysCount && !p.IsManual);
// takes almost 3 seconds to complete
foreach (var item in x)
{
// do stuff that takes < 1 ms
}