There are times when you need to debug your Sitecore codebase and find out what part of the code is taking the most time and troubleshoot page load times. One of the most useful methods is to load the following page (after you have logged into Sitecore)
http://{YourWebsite}/?sc_mode=normal&sc_debug=1&sc_trace=1&sc_prof=1&sc_ri=1&sc_rb=1
sc_mode – don't load the experience editor
sc_debug - turn on the debug mode
sc_trace - turn on Sitecore trace
sc_prof - turn on Sitecore profiler
sc_ri - show rendering information
sc_rb - show rendering borders
Next scroll down to the bottom of your page and you should see something similar to this image
It should show you where the most time is spent. The next step would be to identify the section of your code base that is taking the most time and drill down to more specifics. To find out exactly how long a particular section of code takes, add the following:
You can replace the string "SitecoreingTesting" with anything more relevant to you. Also add multiple of such blocks throughout your code. Next go back to your debug page
http://{YourWebsite}/?sc_mode=normal&sc_debug=1&sc_trace=1&sc_prof=1&sc_ri=1&sc_rb=1
On this page, search for your custom strings like "SitecoreingTesting" and you should see relevant debug and time information that usually is useful to pin point the code that is causing performance issues.
For quick page load time, I found the following chrome extension very useful.
Chrome page load time extension
Hope this helps someone during their performance troubleshooting phase. Good luck!
http://{YourWebsite}/?sc_mode=normal&sc_debug=1&sc_trace=1&sc_prof=1&sc_ri=1&sc_rb=1
sc_mode – don't load the experience editor
sc_debug - turn on the debug mode
sc_trace - turn on Sitecore trace
sc_prof - turn on Sitecore profiler
sc_ri - show rendering information
sc_rb - show rendering borders
Next scroll down to the bottom of your page and you should see something similar to this image
It should show you where the most time is spent. The next step would be to identify the section of your code base that is taking the most time and drill down to more specifics. To find out exactly how long a particular section of code takes, add the following:
You can replace the string "SitecoreingTesting" with anything more relevant to you. Also add multiple of such blocks throughout your code. Next go back to your debug page
http://{YourWebsite}/?sc_mode=normal&sc_debug=1&sc_trace=1&sc_prof=1&sc_ri=1&sc_rb=1
On this page, search for your custom strings like "SitecoreingTesting" and you should see relevant debug and time information that usually is useful to pin point the code that is causing performance issues.
For quick page load time, I found the following chrome extension very useful.
Chrome page load time extension
Hope this helps someone during their performance troubleshooting phase. Good luck!
Comments
Post a Comment