In one of our environments, we have built a code generator where the power user can create models at runtime and deploy them. No need to mention that we are using EF 5.0 Code First.
Our application itself also has many models that it is using internally. So the dbContext may end up having at least 80 properties and more (80+ tables).
What we are observing is that the initial asp.net application load time is rather high and the memory consumption in the IIS process is high as well (600MB+).
What are the ways that we can configure EF to be more careful with performance and memory usage?
UPDATE: Seems like the only way to do pre-compiled view generation for fixed entities. This way we can boost the performance since ratio of fixed models to dynamic ones is 60% to 40% in our projects
How do we generate per-compiled views for Code-First?
UPDATE: Using EF Power Tools I was able to generate the views. Now i am wondering if I can have two separate Code-First Contexts in the same project. For one I intend to generate views since the models are fixed. The second one models can be changed by administrators, so for now I have no easy way of generating views for them. Do you think this would be possible?