MY site take 6.5 seconds to wake up!

My ASP.Net site is taking 6.5 seconds to wake up! Can anything be done to speed this up? Sometimes it is taking over 10 seconds to fire up! It fires up almost instantly when working locally. I obviously expect a bit of a performance dropped with the Jodohosted site, but 6.5 - 10 seconds is not acceptable for potential users/customers.

Asp.net compiles the pages on first visit to any page and and store it in a template cache, this is where it takes time. After this the subsequent visits to the page are pretty fast.

But isn’t 10 seconds a bit excessive? It’s only a basic site at the moment! I thought 3 seconds was more usual (and reasonable)?

Re compile times. The way I understand it is that if you have developed your app in Visual Studio using code behind files, then one uploads the .aspx pages in the same way one would upload html files, and also upload the compiled dll to the bin(ary) directory. Then, when you first run the app (ie visit the web site) the .net runtime quickly returns the page.

On the other hand, if you don’t have code behind files but put the code on the same page as the .aspx pages (at the top between script tags) then the .net runtime has to compile the pages every time since there is no compiled dll already sitting there.

I use the first method and my pages always load very quickly, no matter how long they’ve been “off the air” so to speak.

Maybe Daze’s snag is more to do with database access. Are you web pages running any SQL quieries?

Perhaps some .net guru could shed some light here?

Hi BlueJag.

I too use the code behind approach (only aspx and dlls uploaded, no .cs files). All database access is via SQL Server stored procedures and they’re all pretty simple at the moment TBH.

My pages wake up almost instantly on my local development machine.

I’ll have a play around to see if I can determine if there is a bottleneck somewhere…

I would look at seeing if you have to connect to the database before the page loads or if it can be made to be later. Thats usually a big bottleneck. Often see this from folks saving pictures in databases and calling them in, instead of static loads.