As per Kevin Ramen’s comment (Mar 29)
I can confirm that setting db.Configuration.AutoDetectChangesEnabled = false
makes a huge difference in speed
Running Add()
on 2324 items by default ran 3min 15sec on my machine, disabling the auto-detection resulted in the operation completing in 0.5sec.
http://blog.larud.net/archive/2011/07/12/bulk-load-items-to-a-ef-4-1-code-first-aspx