ASP.NET 2.0 website with SF optomization


Author
Message
Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I just published a SF/SQL website and the first time a visitor goes to the site, the pages are slow to load. My understanding of this is because the HTML is dynamically rendered in ASP.NET and the first time it essentially just takes longer.



Is there any way to speed this up other than throw hardware at it?



The initial pages are not complex but still take 3-10 seconds to load the first time, subsequent visits are much faster but I think this still leaves the wrong initial impression.



Any help or insight will be appreciated.

Keith Chisarik
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Actually the problem is that the website is compiling the first time a visitor is showing up at your site, and thus the slowness.  You need to precompile your website to resolve this issue.  .NET comes with an ASP compiler that will do this for you and can even be added to a post build event, or just added to a batch file.  This is basically the same thing as right-clicking the web site and then clicking publish.  Using the command line option will allow you to add any additional copy commands after the aspnet_compiler and place it in a general location so that you can upload is separately if you need to.  Below is an example of how to pre-compile a site.

aspnet_compiler -p "c:\MyDevWebSite\" -v / "c:\Output\compiled site"

FYI, you can run this through the Visual Studio command prompt or just directly call it.  This file is located "C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe".

Keith Chisarik
Keith Chisarik
StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)StrataFrame VIP (1.5K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
I thought I did that, maybe I did it wrong. Attached is a SS of how I published, then I copied the resultant directory to my web server via FTP.



Am I lost?





Keith Chisarik
Attachments
compile_options.jpg (213 views, 31.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
No.  It generally this will work.  You might try the manual option.  Now keep in mind that the very first visitor after IIS has been restarted might take just a second to load the site.  However, after this it should always be fast.  You can be the "first visitor" to make sure the site is loaded.  Afterwards though, it should be fast for all other visitors.
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Pre-compiling the website is supposed to fix the 1st page load slowdown because the when the page is stale, it has to be recompiled. 

However, if you're still getting very poor responsiveness for the first page request, you can try some other things:

1) Put the website in it's own application pool
2) Place a standard .html file in the site and see if it takes as long as the .aspx pages do

gbenjamin
gbenjamin
StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)StrataFrame Beginner (1 reputation)
Group: Forum Members
Posts: 1, Visits: 15
Another option I find helpful is to disable idle timeouts on the Application Pool in IIS.  Do that under the Performance tab of the Application Pool.  Either uncheck the idle timeout checkbox or set it to a higher value.  I have noticed that over weekends where I work the IIS worker processes will shutdown making our ASP.NET websites slow to load on Monday morning.  By removing the idle timeout we don't have to worry about it.  I would not recommend doing this to the Default pool though so create a new pool, add your site to that pool, and remove the idle timeout.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search