I'm looking to uplift our project from S#arp 1.0,
ASP.NET MVC 1.0, etc. I decided to start a test project from scratch with the latest toolset. I am able to get the site running and have two basic objects (only the Id field) mapped from our database. However, when I try to run the website from within VS2012 RC, there is a very long delay before the homepage is displayed.
I put in very crude debugging lines into Global.asax.cs just to get a very quick idea of where the time is being spent. Here's the console log:
--Snip lots of dll lines loading--
8/6/2012 8:36:40 AM - Start Application_Start()
8/6/2012 8:36:41 AM - Start InitializeServiceLocator()
8/6/2012 8:36:41 AM - End InitializeServiceLocator()
--More DLLs loading --
8/6/2012 8:36:42 AM - End Application_Start()
8/6/2012 8:36:42 AM - Start Init
8/6/2012 8:36:42 AM - End Init
8/6/2012 8:36:42 AM - Start InitialiseNHibernateSessions()
8/6/2012 8:36:42 AM - Start AutoPersistenceModelGenerator.Generate()
8/6/2012 8:36:42 AM - End AutoPersistenceModelGenerator.Generate()
8/6/2012 8:38:55 AM - End InitialiseNHibernateSessions()
8/6/2012 8:38:57 AM - Start Init
8/6/2012 8:38:57 AM - Start Init
8/6/2012 8:38:57 AM - End Init
8/6/2012 8:38:57 AM - End Init
There is a 2+ minute delay that comes from the call to NHibernateSession.Init(...) which is within InitialiseNHibernateSessions(). I see some NHibernate discussion from 2010 regarding Fluent NHibernate and XML serialization.(
http://nhforge.org/blogs/nhibernate/archive/2009/03/13/an-improvement-on-sessionfactory-initialization.aspx), but I'm not sure this is the same thing or not.
Is anyone else seeing a delay similar to mine? I can understand that the initialization will take sometime, but the old project only takes 15 - 20 seconds with many, many more and complex objects. Do I have a web.config setting wrong? Is there something in the Infrastructure project I should do differently?
Thanks
Joe