entity framework - My ASP.NET MVC project loads slower -
hi have project developed in asp.net mvc. using entity framework database first approach. problem facing is, first time when user loads website, takes time load unusual. searching reason behind this. can me in this?
for moment, assuming since using database first approach, have load database project first before connect. think making website load slower.
if case, can guide me generate connection string dynamically during run time in entity framework , connect database?
i have stored procedure can connection string. dont know how can use connection string , connect database.
when “first time when user loads website, takes time load unusual” give comparison of how slow slow first time. , “first time” mean after re-starting iis or re-starting app-pool, may take time of code have turned native code just-in-time computer.
ef may slow down if have many hundreds of tables , has re-construct context based on of tables , relationships. if case, see delay in every time create new ef context. if case, may have create multiple contexts each limited number of tables manage. read on http://msdn.microsoft.com/en-us/magazine/jj883952.aspx
other that, suggest usual things such pre compile views (http://geekswithblogs.net/aligned/archive/2013/05/28/pre-compiling-your-mvc-views.aspx) , use caching love hear how went
Comments
Post a Comment