ASP.NET MVC 3 Razor performance

后端 未结 2 1816
野性不改
野性不改 2020-12-02 06:43

Important Update: See update 5 at the bottom there is no performance issue in asp.net mvc 3, this is a benchmark issue

I\'ve made a simple hello wor

相关标签:
2条回答
  • 2020-12-02 06:51

    (new answer to respond to your RC2 numbers)

    Thanks for the updated numbers. A few points:

    1. Your Aspx numbers look good, in the sense that we expect MVC3 Aspx to be on par with MVC2 Aspx (a bit slower in such a Hello World example is expected)
    2. Your Razor numbers look suspect. We know Razor is a bit slower than the equivalent Aspx, however, the difference should be no larger than 5%-7%. Your numbers indicate 50% slower, which simply does not match up with our results. Check if the project compiles in Release and you have debug="false" set in web.config.
    3. Your CPU utilization is a bit suspect. With 1000 concurrent requests the CPU should be utlized 100%. (Even only 8 concurrent requests should be enough since you have 8 virtual cores)
    4. Your tests are running for about 20-25 seconds. That's a bit on the low side because a short (1-2 seconds) burst of activity elsewhere in the system could throw off your results quite significantly.
    5. Related to point 4, did you run each scenario once or a few times? Are you seeing much variance in the results? Since your OS is doing other things in the background it's typical to see different results between runs.
    0 讨论(0)
  • 2020-12-02 06:51

    How did you perform the benchmark? Was your site deployed on IIS in mode Release? Did you use the <deployment retail="true" /> section in your machine.config? Also remember that ASP.NET MVC 3 is still under heavy development so you cannot expect it to be fully optimized yet. At least wait until it hits RTM.

    0 讨论(0)
提交回复
热议问题