What is the performance difference between ASP.Net Web site Vs Web Application template

A

Adeel Ahmed

Hi,

I have converted my web site from ASP.Net Web Site (Visual Studio Template)
into ASP.Net Web Application template in visual studio 2008 and after
deployment i have seen major performance hits.

WebSite running faster than Web Application (Template).

Is this because of website is pre-compiled and every .aspx page has its own
dll and in case of web application project, only one dll of all pages
created at the time of compilation.

Please give some definite reason, i know the difference between ASP.Net Web
Site & ASP.Net Web Application but if i am talking about the performance i
need to know which one is better.

Thanks
 
A

Allen Chen [MSFT]

Hi Adeel,

My name is Allen Chen. It's my pleasure to work with you on this issue.

From your description you want to know the performance difference between
Web Site and Web Application.

Based on my experience, given a Web Site ("allow this precompiled site to
be updatable" is checked when publishing web site) and a Web Application,
if their codes are same the performance almost has no difference.

If the "allow this precompiled site to be updatable" is unchecked all the
code will be compiled in the assembly after publishing. In this case the
drawback is that we lose the flexibility to edit code without recompilation
after publishing but get some performance elevation for the first request
to the page since the code has all been compiled into the assembly after
publishing the web site.

Therefore, comparing to a non precompiled Web Application, a Web Site has
better performance only if it is precompiled or "allow this precompiled
site to be updatable" is checked. And performance elevation is only for the
first request to the page. Any subsequent requests should has same
performance.

If we precompile the Web Application, I believe its startup performance
should be identical with Web Site.

http://msdn.microsoft.com/en-us/library/ms227972.aspx

If what you observed is, the performance of Web Application is not so well
even on the second request to the page, I would guess code of your Web
Application is not the same as the Web Site's.

Hope my reply can provide some assistance and please feel free to ask if
you have additional questions.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
A

Adeel Ahmed

I have read that article, it doesn't explain the performance difference
between them.
 
A

Adeel Ahmed

Thanks Allen for the detailed response,

Actually we are starting a project in Asp.Net and developed a functional
mockup in Asp.Net Web Site template, I did some research and found that web
application is more scalable than web site, than I convert the whole project
into web application (From VS2008 feature 'Convert to Web Application') and
deployed on the same server at different port.

After that I have created a load test (by Visual studio 2008 test suit) and
run on both sites (On Same Code). Load test result shows that web site is
better than web application. The average response time of Web site is less
than web application,

Here are the load test result, I ran four iteration of similar load test.

Load Test Configuration
----------------------------User
Initial Load 200
Maximum User Count 1000
Step Duration (Sec) 10
Step Ramp Time (Sec) 0
Step User Count 100
Think Time (Sec) 80

Web Site Average
Response Time (Sec) Web Application Average Response Time (Sec)
Iteration # 1: 4.61
4.38
Iteration # 2: 3.58
4
Iteration # 3: 3.41
9.99
Iteration # 4: 3.52
7.1

Hope you got it.
Adeel
 
A

Allen Chen [MSFT]

Hi Adeel,

Thanks for the update. I have two suggestions.

1. As I mentioned in my previous post, try to precomipile your site after
publishing.
2. Please read the following article to see if debug is set to true in your
config:
http://weblogs.asp.net/scottgu/archive/2006/04/11/442448.aspx

Please try the above two steps and test again to see if performance still
has that gap.

Regards,
Allen Chen
Microsoft Online Support
 
A

Adeel Ahmed

Thanks Allen, for the suggestion.
I recompiled the whole site again with lots of performance improvements
techniques like
Minimize HTTP calls,
IIS Caching,
Minimize page size etc
and also set "debug=false" in Web.Config.

By all these changes both site (Web Site & Web Application) have the same
response time :)

So the conclusion is that there is no difference in performance between Web
Site & Web Application template, if you deploy pre-compile web site.

Thanks Again.
Adeel
 
A

Allen Chen [MSFT]

You're welcome Andeel.

Thank you for using our Newsgroup Support Service!

Regards,
Allen Chen
Microsoft Online Community Support



=================================================
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
=================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top