My website has a very slow intial load time. If I try to open my page after some time of inactivity it takes the browser almost 7-8 seconds to even try to load my page. When loading of the first page is done, every other page loads just fine.
Most likely JIT Compilation and assembly loading if your site is a Web Site project rather than a Web Application project. This will happen if the App Pool is recycled, which is most likely to happen after a period of inactivity.
The default page is usually used to have 50% more scripts than other pages. So that is cause of it maybe. Because if other pages load at a good speed than its not an issue with IIS or any other. The scripts are causing this.
Try to checking all scripts once again. And deleting any un-necessary script or clause.
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
I've had the same problem with my sites. The problem could be with your hosting company in addtition to the suggestions with the post above. Azure and some other hosts have this problem with first page load. Try contacting your hosting company to see if
they may be able to help. I had to do that with my host and things seem to be working fine now.
"This will happen if the App Pool is recycled, which is most likely to happen after a period of inactivity"
Now, if you find good host, even after app pool is recycled your page will load fast (not as fast as 2nd request but still first request takes 2-3 sec with good host) - keep in mind , we don't know what you run there - it might be super "heavy" site you
try to run...
I host the site myself on dedicated machine with I5 processor and 16GB of ram and dedicated internet connection. It is the only site on the server and it is 10mb big (30 pages). A very simple site.
@Afzaal - Loading is not the problem, but the delay before it even starts to load.
@Mike - It is indeed a WebSite. When I develop my app localy whenever I try to refresh my browser it has the same 5-8 secunds delay before load. Do you recommend using Web Site or Web Application project ? What can I do to speed it up on my production server
?
exe.bat
Member
1 Points
8 Posts
Very slow first page load
Jan 21, 2013 07:31 PM|LINK
Hi all.
My website has a very slow intial load time. If I try to open my page after some time of inactivity it takes the browser almost 7-8 seconds to even try to load my page. When loading of the first page is done, every other page loads just fine.
What might be the problem ? Thanks in advance.
wavemaster
Participant
1279 Points
1124 Posts
Re: Very slow first page load
Jan 21, 2013 08:01 PM|LINK
running locally, or running in a hosted environment?
Mikesdotnett...
All-Star
154818 Points
19853 Posts
Moderator
MVP
Re: Very slow first page load
Jan 21, 2013 09:40 PM|LINK
Most likely JIT Compilation and assembly loading if your site is a Web Site project rather than a Web Application project. This will happen if the App Pool is recycled, which is most likely to happen after a period of inactivity.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
goel.ankit
Contributor
2531 Points
513 Posts
Re: Very slow first page load
Jan 23, 2013 08:34 AM|LINK
Try resetting the IIS and checking the application. check if you are making any heavy database call on the first page.
Ankit
(Please select 'Mark as Answer' if my response has helped you.)
wavemaster
Participant
1279 Points
1124 Posts
Re: Very slow first page load
Jan 23, 2013 04:03 PM|LINK
At one time I had the same issues. It happened shortly after I had moved my site to Azure.
I had some fellow posters try my site and they said it loaded very quickly.
Have you tried it when hosted?
Robert
Afzaal.Ahmad...
Contributor
2660 Points
1039 Posts
Re: Very slow first page load
Jan 23, 2013 04:13 PM|LINK
The default page is usually used to have 50% more scripts than other pages. So that is cause of it maybe. Because if other pages load at a good speed than its not an issue with IIS or any other. The scripts are causing this.
Try to checking all scripts once again. And deleting any un-necessary script or clause.
~~! FIREWALL !~~
wavemaster
Participant
1279 Points
1124 Posts
Re: Very slow first page load
Jan 23, 2013 04:15 PM|LINK
Yes, Afzaal is correct. Make sure you have the minimized version of any jquery stuff you have in there.
davidsa
Member
210 Points
126 Posts
Re: Very slow first page load
Jan 24, 2013 09:24 PM|LINK
I've had the same problem with my sites. The problem could be with your hosting company in addtition to the suggestions with the post above. Azure and some other hosts have this problem with first page load. Try contacting your hosting company to see if they may be able to help. I had to do that with my host and things seem to be working fine now.
ZiggyK
Member
6 Points
4 Posts
Re: Very slow first page load
Jan 25, 2013 05:04 PM|LINK
As Mike said:
"This will happen if the App Pool is recycled, which is most likely to happen after a period of inactivity"
Now, if you find good host, even after app pool is recycled your page will load fast (not as fast as 2nd request but still first request takes 2-3 sec with good host) - keep in mind , we don't know what you run there - it might be super "heavy" site you try to run...
exe.bat
Member
1 Points
8 Posts
Re: Very slow first page load
Jan 25, 2013 07:18 PM|LINK
I host the site myself on dedicated machine with I5 processor and 16GB of ram and dedicated internet connection. It is the only site on the server and it is 10mb big (30 pages). A very simple site.
@Afzaal - Loading is not the problem, but the delay before it even starts to load.
@Mike - It is indeed a WebSite. When I develop my app localy whenever I try to refresh my browser it has the same 5-8 secunds delay before load. Do you recommend using Web Site or Web Application project ? What can I do to speed it up on my production server ?