zoukankan      html  css  js  c++  java
  • 教你50招提升ASP.NET性能(二):移除不用的视图引擎

    (2)Remove unused View Engines

    招数2:

    移除不用的视图引擎

    If you're an ASP.NET MVC developer, you might not know that ASP.NET still loads the View Engines for both Razor and Web Forms by default. This can cause performance issues because MVC will normally look for Web Forms views first, before switching over to the Razor views if it can’t find them.
    如果你是ASP.NET MVC开发人员,你可能不知道ASP.NET会默认加载Razor和Web Forms两种视图引擎。这可能引起性能问题,因为MVC总是会首先查找Web Forms视图,在不能找到它们的时候才会转向Razor 视图。

    You can quickly eliminate this performance issue by adding the following two lines to your Global.asax, in the Application_Start():
    你可以在Global.asax,Application_Start()添加下面的两行代码很快地排除这个性能问题

    ViewEngines.Engines.Clear();
    ViewEngines.Engines.Add(newRazorViewEngine());

    Goodbye Web Forms View Engine!
    再见Web Forms视图引擎!

  • 相关阅读:
    POJ 2418 Hardwood Species(STL在map应用)
    在反思性学习
    孙陪你,了解它的权力--Kinect结合的发展Unity3D游戏应用开发
    python在windows通过安装模块错误
    Linux怪哉ntfs
    Js 表单序列化
    微信开发
    Ecshop开发
    FTP配置和用户设置权限
    wget
  • 原文地址:https://www.cnblogs.com/JavCof/p/3169322.html
Copyright © 2011-2022 走看看