Wednesday, May 9, 2012

Slow Page Load and Missing Placeholders and Properly hiding SubLayouts

Sometimes when developing a page, you need to remove a sub-layout from a page temporarily.  It is very tempting to rename the placeholder to a non-existing placeholder sometimes simply putting an x or zzz on the end.  This will work to hide the items but you will get a performance penalty of 1.6 ms.

A better way to do this is simply clear the Placeholder field.  When rendering Sitecore will skip sub-layouts where the placeholder field is empty but if you place anything in the placeholder field then Sitecore must look in the layout or sub-layouts for the placeholder.  

If this does not solve your issue with the page loading then the other option is the Sitecore Debug.

If you login to the Sitecore Admin in Desktop view you will see a Debug menu option in the Sitecore Menu.
Clicking on it will open the site in debug mode.  Navigate to the slow page.  Once it loads scroll down and you will see the breakdown of components loading.  As well if you scroll down further you will see a trace.  Sometimes you will see warnings in the trace and this may solve your problem.  This is how I found and solved the missing placeholder issue.

If you have any tips, tricks or resources you would like to share please email them to sitecoreguild@outlook.com

No comments:

Post a Comment