6

Will putting all my tables in a single edmx significantly harm performance? I have heard this is a bad practice, but this was before entity implemented lazy load. So, now that we have entity 4, is it a non-issue?

I plan to abstract my Models by extending the partial classes of each generated entity, implementing ICrud<ConcreteModel>. This, combined with MVC3 should nullify any coupling concerns.

P.Brian.Mackey
  • 43,228
  • 68
  • 238
  • 348
  • How many tables are we talking about? – Justin Morgan - On strike Feb 28 '11 at 21:32
  • I don't think EF was designed to slow down depending on how many tables are present in the model, as long as you are not loading every single collection of entities in the model, shouldn't affect anything... – Davide Piras Feb 28 '11 at 21:33
  • possible duplicate of [Entity Framework 4: Does it make sense to create a single diagram for all entities?](http://stackoverflow.com/questions/3867479/entity-framework-4-does-it-make-sense-to-create-a-single-diagram-for-all-entiti) – Ryan Gates Jul 25 '14 at 18:53

1 Answers1

3

Yes, it does hurt the performance. Performance Issues in Metadata Load Times and in View Generation are the results of a big EDMX model.

Take a look at this post where I discussed this matter at length:

Entity Framework 4: Does it make sense to create a single diagram for all entities?

Community
  • 1
  • 1
Morteza Manavi
  • 33,026
  • 6
  • 100
  • 83
  • Your post provides some great insight. How does Lazy Load fit into the picture? Was existing model performance sufficiently poor to require lazy load on a handful of Entities? Or was there a bootstrapper that used to load them all at once? – P.Brian.Mackey Feb 28 '11 at 21:55
  • Lazy loading has nothing to do with your model being small or big. It's merely an ORM feature that EF lacks on v1.0 so that they added it to v4.0. Like I said, performance wise, Metadata Load Times and View Generation are the only things that you should be worry about if you are planning to create a big entity data model. – Morteza Manavi Feb 28 '11 at 22:01