What are the differences of code/pipeline execution in Sitecore side, when we run on debug mode compared to normal page request?

Facing a strange issue where normal page request takes long time to load, but the same page loads fine in debug mode (Sitecore PaaS instance).

  • Is there any specific pipeline/code where it skips on debug mode ?

Update 10/09/2019 : As @TomT updated in the comment below, It turns out the reason for this issue was due to CI/CD process coping incorrect sitecore version files to Sitecore 8 site. And VisitorIdentification code has cause this issue due to that mismatch files on the site.

  • 2
    Have you tried to use sitecore/admin/pipelines.aspx to see what takes that long? – Marek Musielak May 29 '18 at 11:43
  • Do you have anything in the code that only gets executed in Normal mode? @if (Sitecore.Context.PageMode.IsNormal) – Ahmed Okour May 29 '18 at 13:43
  • 1
    Ugh! Since it's PaaS and strangely enough you get better loading with Debug on, I would note which renderings took the longest and would disable them one at a time while reloading page in non-debug mode. This is ugly, but you might be able to identify which rendering is the culprit. – Alex Kronberg Mar 7 '19 at 15:27
  • 1
    I guess that it is something with analytics. Probably some of your controls have complex analytics rules/tracking. If I would you I will look in that direction. – Anton May 28 '19 at 4:49
  • 1
    I worked with scFootsteps on this one. The issue ended up being caused by the VisitorIdentification code. The CI/CD deployment process was actually accidentally copying over an old version of the website files into the Sitecore 8 instance. – TomT Sep 9 '19 at 3:35

I were getting same scenario in our case which was as below.

  1. We were using Sitecore Managed Cloud PaaS Scaled environment.
  2. In debug mode page performance show it was working fine. But actual page never worked, it was taking ages to come up.
  3. Then we checked for three thing in CM/CD role which were as below. 3.1 Is the caching enabled in Sitecore for those rendering/layouts/sublayouts and published--- this you need to check in CM role and if not enabled i would recommend to enable it and publish those. 3.2 In case of MVC implementation check if you are using precompiled MVC views recommended by Sitecore (https://kb.sitecore.net/articles/672774).---- If not just follow section from mentioned KB article and configure precompiled MVC view to your implementation. This has to applied on both CM CD instances. 3.3 The last thing which we checked is Solr index update strategy on CD role which was unfortunately onPublishEndAsyncSingleInstance strategy. So we set that to Manual.

As a result of doing all this we got everything working smooth and fast. This resolution also stopped one error which we were getting for time-out after deployment for first request.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.