<p>The first time I load the website in the production web server, it start very slow, subsequent pages load very quickly (included the home page).</p>

<p>I precompiled the site, but nothing changes. </p>

<p>I don't have any code at Application start.
I don't have cached items.</p>

<p>Any ideas? How can I find out what is happening?</p>

[{'answer_id': 26272, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 0, 'selected': False, 'text': "<p>This sounds very much like background compiling; though if you're precompiling, that shouldn't be an issue.</p>\n\n<p>First thing I would look at is your ORM (if any). NHibernate, in particular, has a serious startup penalty, as it runs multiple compilers in the background at startup to turn each class in your data layer into its own in-memory assembly.</p>\n"}, {'answer_id': 26275, 'author': 'ila', 'author_id': 1178, 'author_profile': 'https://Stackoverflow.com/users/1178', 'pm_score': 2, 'selected': False, 'text': '<p>When you published the site, did you choose to make the website "updatable" in the publish website\'s settings or not? If I remember well, the aspx / ascx file need to be compiled as well, and if they are "updatable" then the first start will cause a recompile of those resources.</p>\n'}, {'answer_id': 26279, 'author': 'Mickey', 'author_id': 1494, 'author_profile': 'https://Stackoverflow.com/users/1494', 'pm_score': 1, 'selected': False, 'text': '<p>Have you turned on <a href="http://msdn.microsoft.com/en-us/library/y13fw6we.aspx" rel="nofollow noreferrer">tracing</a> in your web.config?</p>\n'}, {'answer_id': 26310, 'author': 'Darren Kopp', 'author_id': 77, 'author_profile': 'https://Stackoverflow.com/users/77', 'pm_score': 5, 'selected': True, 'text': "<p>It's just your app domain loading up and loading any binaries into memory. Also, it's initializing static variables, so if you have a static variable that loads up a lot of data from the db, it might take a bit.</p>\n"}, {'answer_id': 26327, 'author': 'Dillie-O', 'author_id': 71, 'author_profile': 'https://Stackoverflow.com/users/71', 'pm_score': 0, 'selected': False, 'text': "<p>Just a quick nod at Darren. That's typical behavior of a .NET app after a DLL update is made. After the initial load everything should zip along just fine.</p>\n"}, {'answer_id': 26404, 'author': 'icelava', 'author_id': 2663, 'author_profile': 'https://Stackoverflow.com/users/2663', 'pm_score': 0, 'selected': False, 'text': '<p>When you say "precompile" the site, are you using the <a href="http://msdn.microsoft.com/en-us/library/ms229863%28VS.80%29.aspx" rel="nofollow noreferrer">aspnet_compiler</a> utility to precompile, or simply using the "Build site" option in Visual Studio?</p>\n\n<p>If you are not carrying out the former, I recommend <a href="http://odetocode.com/blogs/scott/archive/2006/10/17/8190.aspx" rel="nofollow noreferrer">giving it a spin</a>. Coupled with <a href="http://msdn.microsoft.com/en-us/asp.net/aa336619.aspx" rel="nofollow noreferrer">Web Deployment Projects</a>, you should have an easier time deploying your site for each release.</p>\n'}, {'answer_id': 26421, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 0, 'selected': False, 'text': '<p>The initial slowness is a couple things:</p>\n\n<ul>\n<li>The appDomain is being setup</li>\n<li>ASP.NET is parsing and compiling the ASPX pages. </li>\n<li>Global Contexts are being initialized.</li>\n</ul>\n\n<p>This is normal behavior for ASP.NET.</p>\n'}, {'answer_id': 30955, 'author': 'Mickey', 'author_id': 1494, 'author_profile': 'https://Stackoverflow.com/users/1494', 'pm_score': 0, 'selected': False, 'text': '<blockquote>\n  <p>@Mickey: No, it is turned off. Do I need to turn it on to find out?</p>\n</blockquote>\n\n<p>The trace log will show you how long each action takes.  It could help you find what is taking so long.</p>\n\n<p><a href="http://davidhayden.com/blog/dave/archive/2005/07/17/2396.aspx" rel="nofollow noreferrer">Here</a> is a link that might help you get it setup.</p>\n'}, {'answer_id': 1044645, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>Try clearing your event log?</p>\n'}, {'answer_id': 1985165, 'author': 'ashish jaiman', 'author_id': 44292, 'author_profile': 'https://Stackoverflow.com/users/44292', 'pm_score': 1, 'selected': False, 'text': '<p>use <a href="http://www.iis.net/expand/ApplicationWarmUp" rel="nofollow noreferrer">http://www.iis.net/expand/ApplicationWarmUp</a> for warming up your app\nthis is for IIS 7.5 - so if you are running on Server R2 then it will work.</p>\n'}, {'answer_id': 20238477, 'author': 'Robert', 'author_id': 2866037, 'author_profile': 'https://Stackoverflow.com/users/2866037', 'pm_score': 1, 'selected': False, 'text': "<p>Make sure you publish your application in 'release' and not 'debug'. I've noticed this decreases loading time considerably. The web.config file will be updated.</p>\n"}]
['https://Stackoverflow.com/questions/26260', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2385/']