Entity Framework Gotcha

If you want to migrate a lot of data which means running updates to existing rows, it is 100X faster to first change the objects then run a single save changes call, instead of doing row by row call.

Also, when batching such operations say by 5000 rows, re-initialize the entities object each time, otherwise it will cache everything progressively getting slower over time.

Comments

Popular posts from this blog

Enable Visual Studio to use more than 2GB of memory

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Firefox and Chrome dark mode