Response time degradation for pages that use MVC presentation


Description

Sitecore uses the following processors to measure the performance of rendering MVC presentation:

These processors can be disabled to improve rendering time and optimize page response time.

Solution

To resolve the issue, disable the profiling on the front-facing instances (Content Delivery) by creating a configuration patch file in the \App_Config\Include\zzz folder:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:env="http://www.sitecore.net/xmlconfig/env/">
    <sitecore role:require="ContentDelivery" env:require="!Profiling">
        <pipelines>
            <mvc.renderPlaceholder>
                <processor type="Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.InitializeProfiling, Sitecore.Mvc">
                    <patch:delete />
                </processor>
            </mvc.renderPlaceholder>
            <mvc.renderRendering>
                <processor type="Sitecore.Mvc.Pipelines.Response.RenderRendering.InitializeProfiling, Sitecore.Mvc">
                    <patch:delete />
                </processor>
                <processor type="Sitecore.Mvc.Pipelines.Response.RenderRendering.StartStatisticRecording, Sitecore.Mvc">
                    <patch:delete />
                </processor>
                <processor type="Sitecore.Mvc.Pipelines.Response.RenderRendering.RecordStatistic, Sitecore.Mvc">
                    <patch:delete />
                </processor>
            </mvc.renderRendering>
        </pipelines>
    </sitecore>
</configuration>