3

I'm starting a new project with MVC and I've never used the Razor engine. Will there be any performance gains or hits as compared to using the standard Content/Master pages? I know that Razor looks better and seems easier to program for, but what is the cost?

Thanks

John Farrell
  • 24,673
  • 10
  • 77
  • 110
tpayne
  • 33
  • 3
  • 1
    There is no cost. Razor is just-in-time compiled, just as normal content/master pages. – driis Apr 12 '11 at 18:18

1 Answers1

1

Razor, according to these tests, is slightly slower:

ASP.NET MVC 3 Razor performance

Community
  • 1
  • 1
John Farrell
  • 24,673
  • 10
  • 77
  • 110
  • I must be reading these results incorrectly because to me it appears to be slower (although I don't think these tests are enough to make a meaningful conclusion on a full scale application) – Marek Karbarz Apr 12 '11 at 18:19
  • Oh wow! Thanks :) Ok, I just checked it out, the results are confusing and they are for the Betas and RCs. Is there any data with the final version? – tpayne Apr 12 '11 at 18:20
  • @Marek Karbarz - Thanks, I am slow sometimes. – John Farrell Apr 12 '11 at 18:25
  • The final conclusion, when the tester turned off Debug in web.config, was that they were essentially equal. – Andrew Barber Apr 15 '11 at 04:11