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视图引擎!

  • 相关阅读:
    windows x64 软件约定
    windows 64位 系统非HOOK方式监控进程创建
    win 64 ring0 inline hook
    win 64 Shadow ssdt hook
    win 64 SSDT HOOK
    win 64 文件操作
    win64 驱动内存基本操作
    windbg符号表问题
    Windows 64位驱动编程基础与win64 ssdt
    基础知识
  • 原文地址:https://www.cnblogs.com/JavCof/p/3169322.html
Copyright © 2011-2022 走看看