an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Installation > Slow load on first request
Last Post 6/26/2009 4:35:03 AM By lukezy. 9 replies.
3/20/2009 3:53:03 PM
micahsdad1402
Posts: 31
Joined: 11/2/2008
Location:Melboune Australia
Slow load on first request
Loading DSC on the first request seems to take some time.
 
I suspect (my knowledge is pretty thin here) that it is something to do with compiling scripts on first load.
 
Is there a way to speed this up, or do I just schedule a http get first thing every day.
 
JJ
3/20/2009 4:00:30 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Slow load on first request
You can use "Publish" in Visual Studio to compile the source code into binaries. It should speed up the first page load.
DotShoppingCart Staff
3/20/2009 11:34:10 PM
micahsdad1402
Posts: 31
Joined: 11/2/2008
Location:Melboune Australia
Re: Slow load on first request
Lukesy,
 
When I went to build the website, get this error:
 
Error    1    Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)       
 
3/21/2009 3:33:59 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Slow load on first request
The file is in the web\bin directory. You can just add the reference in the project.
DotShoppingCart Staff
6/24/2009 12:44:02 AM
jasonGrapecity
Posts: 5
Joined: 6/17/2009
Re: Slow load on first request
I have tried to "Publish" the website in Visual Studio to compile the source to dll including aspx code behind. The first load seems still very slow. Could you explain or suggest a solution ?
Thanks.
 
Jason.
6/24/2009 6:16:57 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Slow load on first request
That's the nature of ASP.NET which loads all the dependent assemblies in the first page load. Why is it an issue? All the subsequent page loads are just fine. You won't hit it again until app pool recycles or server restarts.
DotShoppingCart Staff
6/24/2009 9:48:02 PM
jasonGrapecity
Posts: 5
Joined: 6/17/2009
Re: Slow load on first request
Your right about the nature of asp.net !
The subsequence request to the other pages are fast and so as the request to the homepage.
The thing is that after a while and a browser was closed before , say 5 minutes, the request to the homepage is as slow as the very first request.
 
Thanks.
Jason
6/25/2009 2:53:17 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Slow load on first request
Check your app pool setting. By default it releases all the resources after it's idle for a while. You can change the idle timeout. But if your site doesn't have lot of traffic, what bother the slow first page load? If you have a shared hosting plan, your ISP might oversell the machine resources.
DotShoppingCart Staff
6/26/2009 2:48:53 AM
jasonGrapecity
Posts: 5
Joined: 6/17/2009
Re: Slow load on first request
No, I just deployed my app in a virtual machine in my LAN network.] for testing purpose and we do plan to expect thousards of users (40000 per day). Are you sure that it is pool problem ??? Any other thoughts ???
thanks.
6/26/2009 4:35:03 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Slow load on first request
It's not a problem. It's by design by ASP.NET.
DotShoppingCart Staff