Why DetectChanges is slow?...Why Entity Framework DetectChanges is slow?...More entities your context own, slower the DetectChanges method become!...Entity Framework does a great job detect all changes for us, but in exchange, we pay the high-performance cost!...Scenario:...Let look at this simple example to check the time taken when adding a different number of records, such as 1 record, 10, 100, 10000 records, etc....using (var ctx = new EF6.CustomerContext())
{
for(int i = 0; i < lines.Count...