Entity Framework Code First Performance and Memory Consumption -


in 1 of our environments, have built code generator power user can create models @ runtime , deploy them. no need mention using ef 5.0 code first.

our application has many models using internally. dbcontext may end having @ least 80 properties , more (80+ tables).

what observing initial asp.net application load time rather high , memory consumption in iis process high (600mb+).

what ways can configure ef more careful performance , memory usage?

update: seems way pre-compiled view generation fixed entities. way can boost performance since ratio of fixed models dynamic ones 60% 40% in our projects

how generate per-compiled views code-first?

update: using ef power tools able generate views. wondering if can have 2 separate code-first contexts in same project. 1 intend generate views since models fixed. second 1 models can changed administrators, have no easy way of generating views them. think possible?

you have specific situation - given dynamic nature of code-gen vs code-first models -and @ladislav mentioned. i'm not sure there 'easy answer' if @ all.

normally can make views @ (pre)compile-time - e.g. ef power tools. that's not going work you.

'edmgen.exe' utility of that, automating somehow may 1 option - haven't tried, , challenge given have.

t4 templates - other option.
best source of info require - how use t4 template view generation

however i'm not sure if that's going help either. problem needs edmx model generated in first place - , that's done hand.

now, invoke tool - or try sort of 'reverse engineer' edmx model somehow - , see how it's constructed ef in first place. i'm not sure, it's bit 'speculative'.

here post made know on edmx reader/writer, , how can use that. not sure, maybe expands horizons bit:)
ef 4.3 code first migrations - uncompress __migrationhistory model

also can link in more info how access metadata code, via dbcontext, again i'm not sure if of use you, need info 'before hand'.

and you'll need engage ef source code, able follow , understand how works, , how need, if haven't already.


http://blogs.msdn.com/b/adonet/archive/2008/06/20/how-to-use-a-t4-template-for-view-generation.aspx
ef 4.3 code first migrations - uncompress __migrationhistory model
http://edmxdom.codeplex.com/ (ef 6 overlaps, can find ef5)


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -