Very slow code generation with complex model and EF6.

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
EdB
Posts: 92
Joined: Mon 15 Oct 2012 09:24

Very slow code generation with complex model and EF6.

Post by EdB » Thu 15 Dec 2016 10:26

Hi,

I have a model with 98 classes and 52 complex types. Most of the complex types are involved in Table Per Hierarchy Inheritance. I am finding that the model will generate its POCO code in about 1:30 minutes for EF5 but it takes 20 minutes for EF6 which is a little frustrating.

I have found that with a new model, with say 3 interlinked classes, the generation is immediate. So it seems there is a problem with how EF6 generation copes with model complexit.

There is no difference with V6 of Entity Developer.

a) I am using the seperate Entity Developer studio rather than the VS add-in
b) I have tested with the add-in, but this is worse.
b) I am using EF 6.0.2 within my codebase. Does Studio use the EF version from the project where the EDML resides? Could this older version of EF be causing the problem. Latest version of EF is 6.1.3.
c) I am using 32bit Entity Developer on 64bit Windows 10.
d) My laptop has an i7 with 16GB RAM.

When I switch the target version to EF5, I get the following times

1) EF5/Validation On Build/ View Generation 1:45
2) EF5/Validation On Build/ No View Generation 0:46
3) EF5/No Validation On Build/ No View Generation 0.39
4) EF5/No Validation On Build/ View Generation 1:37

With Entity Framework 6, the timings are much bigger.

1) ED5.8 / EF6/ Validation On Build/ View Generation 14.55 (7:50 until popup "Generation Process" dialog shows)
2) ED5.8 / EF6/ Validation On Build/ No View Generation 20.18 ( About 19 to popup. Why this increased time without View Generation, I am not sure)
3) ED6 / EF6/ Validation On Build/ No View Generation 20.22 ( About 19.30 to popup)

Point is EF6 code generation is taking way too long and effecting productivity. Also seems strange that EF5 is so much quicker.

What advice can you give please.

Thanks,

Ed

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Very slow code generation with complex model and EF6.

Post by Shalex » Fri 16 Dec 2016 17:53

Could you please zip your model and send it to us so that we can reproduce and investigate the performance loses?

Post Reply