The intention of this article is to compare performance between ASP.NET WebForms and ASP.NET MVC. The main reasons for moving from Webforms to MVC is performance, performance and performance.
Contents
The intention of this article is to compare performance between ASP.NET WebForms and ASP.NET MVC. The main reasons for moving from Webforms to MVC are performance, performance and performance.
FYI: In case you are new to MVC tutorials, you can start from the video given at the end of the article.
For this test, we created two projects, one in ASP.NET MVC and the other in ASP.NET Webforms. We have kept the test absolutely simple. Both the projects display 20 textboxes and there is a grid loaded with 1000 records.
Below is the ASP.NET Webform code behind which binds with a grid server control.
protected void Page_Load(object sender, EventArgs e)
{
for(int i=0;i<1000;i++)
{
obj.Add(DateTime.Now.ToString());
}
GridView1.DataSource = obj;
GridView1.DataBind();
}
}
On the ASPX UI, we have 20 textboxes which uses the server controls of ASP.NET Webforms.
<asp:TextBox ID="TextBox1" runat="server" BackColor="#FF66FF"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" BackColor="#FF66FF">
<asp:TextBox ID="TextBox3" runat="server" BackColor="#FF66FF">
…….
<asp:TextBox ID="TextBox6" runat="server" BackColor="#FF66FF">
In ASP.NET MVC project also, we have similar kind of logic. We have 20 textboxes created using HTML control and a simple loop which creates an HTML table.
<input id="Text1" type="text" style="background-color:#FF66FF" />
<input id="Text1" type="text" style="background-color:#FF66FF" />
<input id="Text1" type="text" style="background-color:#FF66FF" />
@{
List<string> obj = new List<string>();
for (int i = 0; i < 1000; i++)
{
obj.Add(DateTime.Now.ToString());
}
}
@{
foreach (string str in obj)
{
}
}
<table>
Item@str
In this test, we have not used JSON, Jquery, Ajax because we wanted to test performance of these platforms only and not when they get clubbed with other technical things like HTML 5, Ajax, etc.
The test was conducted with the below specifications using VSTS and telerik load test software:
- User load 25 users.
- Run duration of test was 10 minutes.
- Machine config DELL 8 GB Ram, Core i3
- Project was hosted in IIS 8.
- Project was created using MVC 5.
- Network LAN connection was assumed. So this test does not account for network lag for now.
- Browser in the test selected Chrome and Internet Explorer.
- Multiple readings were taken during the test to average unknown events. 7 readings where taken and all readings are published in this article as reading 1 , 2 and so on.
Performance was measured using two criteria, Average page response time and Response content in bytes.
Average Page response time: This value is the average time the 25 users get the page output when the load testing is executed.
Response content length: Number of average total bytes transferred for every request. This criteria is taken because we suspect the server controls generate more amount of HTML as compared to when we write custom HTML.
Response Time
Response time of MVC was much better as compared to Webform. We found ASP.NET MVC response time was two times better than Webforms.
The reason is but obvious. When a request is sent to Webforms, there is a complex ASP.NET page life cycle which gets executed in the code behind. This code behind is nothing but sort of conversion logic which converts the ASP.NET server controls to HTML.
In ASP.NET MVC, there is no code behind and no such conversion is required as the controls are in HTML format themselves.
Content Length
For the same kind of logic, the HTML content length generated from Webform was twice compared to MVC.
When we viewed the view source, we saw huge view state data generated by Webform which was not present in MVC. This means more bandwidth will be consumed when we surf ASP.NET Webform sites as compared to ASP.NET MVC sites.
If you see the conclusion from the load test, we need a solution which does not have code behind and server controls. So when you create ASP.NET MVC projects, you will not find NOcode behind and server controls.
Below is a snapshot of MVC views and you can see there is .CSHTML but there is no CSHTML.CS.
If you go a MVC view and click on toolbox, it has HTML tab only and all the server controls have gone off completely.
You can also read this detailed article which talks about what we missed in ASP.NET MVC from Webforms.
Below are all the seven readings pasted for both Webform and MVC. These readings would provide you more insight on the performance factor between these technologies.
Load Test Summary
Test Run Information
Load test name | LoadTest1 |
Description | |
Start time | 1/11/2015 9:49:56 AM |
End time | 1/11/2015 9:59:56 AM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 19.2 |
Tests Failed | 0 |
Avg. Test Time (sec) | 1.26 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 19.2 |
Avg. Page Time (sec) | 1.25 |
Requests/Sec | 19.2 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 1.25 |
Avg. Content Length (bytes) | 96,425 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/WebForm/WebForm... | 2.30 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest1 | 2.32 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest1 | Scenario1 | 11,510 | 0 (0) | 1.26 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/WebForm/WebForm1.aspx | Scenario1 | WebTest1 | 1.25 | 11,510 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 43.8 | 855 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest2 |
Description | |
Start time | 1/11/2015 12:13:49 PM |
End time | 1/11/2015 12:23:49 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 46.0 |
Tests Failed | 0 |
Avg. Test Time (sec) | 0.49 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 46.0 |
Avg. Page Time (sec) | 0.48 |
Requests/Sec | 46.0 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 0.48 |
Avg. Content Length (bytes) | 58,923 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/LoadTest/SomePa... | 1.13 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest2 | 1.14 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest2 | Scenario1 | 27,619 | 0 (0) | 0.49 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/LoadTest/SomePage | Scenario1 | WebTest2 | 0.48 | 27,619 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 63.0 | 1,012 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest1 |
Description | |
Start time | 1/11/2015 10:25:53 AM |
End time | 1/11/2015 10:35:53 AM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 11.1 |
Tests Failed | 0 |
Avg. Test Time (sec) | 2.22 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 11.1 |
Avg. Page Time (sec) | 2.20 |
Requests/Sec | 11.1 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 2.20 |
Avg. Content Length (bytes) | 100,276 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/WebForm/WebForm... | 5.77 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest1 | 5.80 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest1 | Scenario1 | 6,640 | 0 (0) | 2.22 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/WebForm/WebForm1.aspx | Scenario1 | WebTest1 | 2.20 | 6,640 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 61.2 | 841 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest2 |
Description | |
Start time | 1/11/2015 1:03:06 PM |
End time | 1/11/2015 1:13:06 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 52.2 |
Tests Failed | 0 |
Avg. Test Time (sec) | 0.39 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 52.2 |
Avg. Page Time (sec) | 0.39 |
Requests/Sec | 52.2 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 0.39 |
Avg. Content Length (bytes) | 46,281 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/LoadTest/SomePa... | 1.02 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest2 | 1.03 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest2 | Scenario1 | 31,330 | 0 (0) | 0.39 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/LoadTest/SomePage | Scenario1 | WebTest2 | 0.39 | 31,330 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 65.6 | 855 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest1 |
Description | |
Start time | 1/11/2015 11:04:01 AM |
End time | 1/11/2015 11:14:01 AM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 9.66 |
Tests Failed | 0 |
Avg. Test Time (sec) | 2.54 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 9.66 |
Avg. Page Time (sec) | 2.52 |
Requests/Sec | 9.66 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 2.52 |
Avg. Content Length (bytes) | 99,769 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/WebForm/WebForm... | 9.77 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest1 | 9.77 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest1 | Scenario1 | 5,795 | 0 (0) | 2.54 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/WebForm/WebForm1.aspx | Scenario1 | WebTest1 | 2.52 | 5,795 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 61.0 | 875 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest2 |
Description | |
Start time | 1/11/2015 1:28:54 PM |
End time | 1/11/2015 1:38:54 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 16.1 |
Tests Failed | 0 |
Avg. Test Time (sec) | 1.50 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 16.1 |
Avg. Page Time (sec) | 1.49 |
Requests/Sec | 16.1 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 1.49 |
Avg. Content Length (bytes) | 57,923 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/LoadTest/SomePa... | 2.93 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest2 | 2.94 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest2 | Scenario1 | 9,647 | 0 (0) | 1.50 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/LoadTest/SomePage | Scenario1 | WebTest2 | 1.49 | 9,647 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 31.7 | 862 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest1 |
Description | |
Start time | 1/11/2015 11:28:39 AM |
End time | 1/11/2015 11:38:39 AM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 11.8 |
Tests Failed | 7 |
Avg. Test Time (sec) | 2.08 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 11.8 |
Avg. Page Time (sec) | 2.06 |
Requests/Sec | 11.8 |
Requests Failed | 7 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 2.06 |
Avg. Content Length (bytes) | 100,205 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/WebForm/WebForm... | 5.58 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest1 | 5.60 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest1 | Scenario1 | 7,073 | 7 (0.099) | 2.08 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/WebForm/WebForm1.aspx | Scenario1 | WebTest1 | 2.06 | 7,073 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 75.8 | 922 |
Errors
Type | Subtype | Count | Last Message |
Http Error | 500 - InternalServerError | 7 | 500 - InternalServerError |
Load Test Summary
Test Run Information
Load test name | LoadTest2 |
Description | |
Start time | 1/11/2015 1:17:12 PM |
End time | 1/11/2015 1:27:12 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 30.8 |
Tests Failed | 0 |
Avg. Test Time (sec) | 0.65 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 30.8 |
Avg. Page Time (sec) | 0.64 |
Requests/Sec | 30.8 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 0.64 |
Avg. Content Length (bytes) | 50,657 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/LoadTest/SomePa... | 1.70 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest2 | 1.72 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest2 | Scenario1 | 18,483 | 0 (0) | 0.65 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/LoadTest/SomePage | Scenario1 | WebTest2 | 0.64 | 18,484 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 43.3 | 854 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest1 |
Description | |
Start time | 1/11/2015 1:40:52 PM |
End time | 1/11/2015 1:50:52 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 18.8 |
Tests Failed | 0 |
Avg. Test Time (sec) | 1.32 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 18.8 |
Avg. Page Time (sec) | 1.31 |
Requests/Sec | 18.8 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 1.31 |
Avg. Content Length (bytes) | 100,607 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/WebForm/WebForm... | 2.55 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest1 | 2.56 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest1 | Scenario1 | 11,261 | 0 (0) | 1.32 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/WebForm/WebForm1.aspx | Scenario1 | WebTest1 | 1.31 | 11,261 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
6 System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 60.8 | 891 |
6 Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest2 |
Description | |
Start time | 1/11/2015 2:30:38 PM |
End time | 1/11/2015 2:40:38 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 34.3 |
Tests Failed | 0 |
Avg. Test Time (sec) | 0.68 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 34.3 |
Avg. Page Time (sec) | 0.68 |
Requests/Sec | 34.3 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 0.68 |
Avg. Content Length (bytes) | 57,923 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/LoadTest/SomePa... | 1.60 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest2 | 1.61 |
6 Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest2 | Scenario1 | 20,603 | 0 (0) | 0.68 |
6 Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/LoadTest/SomePage | Scenario1 | WebTest1 | 0.68 | 20,603 |
6 Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
6 System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 54.4 | 915 |
6 Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest1 |
Description | |
Start time | 1/11/2015 2:15:21 PM |
End time | 1/11/2015 2:25:21 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 10.7 |
Tests Failed | 0 |
Avg. Test Time (sec) | 1.98 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 10.7 |
Avg. Page Time (sec) | 1.96 |
Requests/Sec | 10.7 |
Requests Failed | 0 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 1.96 |
Avg. Content Length (bytes) | 101,007 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/WebForm/WebForm... | 3.77 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest1 | 3.79 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest1 | Scenario1 | 6,395 | 0 (0) | 1.98 |
Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/WebForm/WebForm1.aspx | Scenario1 | WebTest1 | 1.96 | 6,395 |
Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 60.4 | 188 |
Errors
Type | Subtype | Count | Last Message |
Load Test Summary
Test Run Information
Load test name | LoadTest2 |
Description | |
Start time | 1/11/2015 2:41:57 PM |
End time | 1/11/2015 2:51:57 PM |
Warm-up duration | 00:00:00 |
Duration | 00:10:00 |
Controller | Local run |
Number of agents | 1 |
Run settings used | Run Settings1 |
Overall Results
Max User Load | 25 |
Tests/Sec | 20.4 |
Tests Failed | 0 |
Avg. Test Time (sec) | 0.67 |
Transactions/Sec | 0 |
Avg. Transaction Time (sec) | 0 |
Pages/Sec | 20.4 |
Avg. Page Time (sec) | 0.66 |
Requests/Sec | 20.4 |
Requests Failed | 4 |
Requests Cached Percentage | 0 |
Avg. Response Time (sec) | 0.66 |
Avg. Content Length (bytes) | 57,904 |
Key Statistic: Top 5 Slowest Pages
URL (Link to More Details) | 95% Page Time (sec) |
http://192.168.15.141:98/LoadTest/SomePa... | 1.38 |
Key Statistic: Top 5 Slowest Tests
Name | 95% Test Time (sec) |
WebTest2 | 1.39 |
Test Results
Name | Scenario | Total Tests | Failed Tests (% of total) | Avg. Test Time (sec) |
WebTest2 | Scenario1 | 12,220 | 4 (0.033) | 0.67 |
6 Page Results
URL (Link to More Details) | Scenario | Test | Avg. Page Time (sec) | Count |
http://192.168.15.141:98/LoadTest/SomePage | Scenario1 | WebTest2 | 0.66 | 12,220 |
6 Transaction Results
Name | Scenario | Test | Response Time (sec) | Elapsed Time (sec) | Count |
6 System Under Test Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
6 Controller and Agents Resources
Machine Name | % Processor Time | Available Memory at Test Completion (Mb) |
USER-PC | 59.0 | 852 |
6 Errors
Type | Subtype | Count | Last Message |
Exception | SocketException | 4 | An existing connection was forcibly closed by the remote host |
So if you are convinced that ASP.NET MVC is the way to go ahead, how about starting to learn MVC right away now. Below is an awesome ASP.NET MVC video which teaches MVC in 16 hours flat.
Lot of developers would raise eyebrows on the above test stating that:
- We have the option of disabling viewstate
- We have the option of using HTML over server controls
- and so on...
Yes, we agree completely that webforms can be tweaked to run in an optimal way and they can have nearly the same performance as ASP.NET MVC.
But this test followed the most used feature approach. In general, when Webform is used 99% times, developers do not disable view state, they use code behind, they use server controls left and right and so on.
Because if we go that route of testing, then ASP.NET MVC also has lot of best practices like jQuery, JSON, etc. to improve performance.
So this test was conducted keeping what is the most used feature in both Webform and MVC. Both these technologies where kept at ground zero and compared using their most used feature in the market.
If you are taken to a bar and you are given a choice of drinking wine or juice. There is high possibility you will drink wine… temptation, human nature whatever you term it as.
But if you are taken to a juice shop, you do not have options and you are compelled to drink only juice.
ASP.NET Webform gives you an option while MVC forces you to follow best practices. So with Webform, I have options of using HTML, disable view state but the human temptation of RAD is so profound that most of the time, people end up using these features.
On the other hand, MVC does not give you the option of code behind, server controls, view state, etc. thus compelling you to use pure HTML and without behind code architecture.
We encourage you to read the below articles as well to enhance your ASP.NET MVC knowledge further.
If you want to start Learning MVC, this MVC article teaches ASP.NET MVC step by step in 7 days.
These two articles are a great read if you want to know in detail about MVC VS Webforms.
If you are preparing for MVC interview, do not this miss 100 ASP.NET MVC interview question series.
For Further Reading do watch the below Interview preparation videos and step by step video series.
- 13th January, 2015: Initial version