Anders M.
Anders M.

Reputation: 199

Entity framework generating and updating edmx file takes forever to finish

I have an application that is called winkompass which comes with a big database, the application feels very old and very chunky. When I try to import or update the database model, it takes a lot of time from when I press add/update model to when I'm asked about running the .tt file.

The computer I am running on is quite powerful, 16gb ram, Intel(R) Core(TM) i5-3320M CPU @ 2.60GMz with an ssd HD. it contains 305 tables, 1448 stored procedures and 77 views. I have tried digging around on the internet and I'm unable to find anything I can use.

Any suggestions are appreciated as this really makes it nearly impossble to create stored procedures to use with the project.

Upvotes: 2

Views: 1386

Answers (1)

Anders M.
Anders M.

Reputation: 199

I solved it by following DavidG's suggestion and splitting up the Model in manageable chunks, the tables could all be in the same model however the stored procedures were the ones that were slowing down entity framework so I had around 150 Stored procedures in each model. The stored procedures could have a whole lot of parameters (one had 107) and this could be what was slowing it down.

The problem might not be the same as other instances of a slow creation/Updating process of the entity framework contextmodel generation, but the answer may be able to lead in the right direction.

Upvotes: 1

Related Questions