Cert++
Close

Using the Code Profiler to locate expensive requests and functions

Key Takeaway

To find the scripts and methods that contribute most to runtime, open the Code Profiler in "Extended Script Development" mode and sort by "Elapsed Time Own > Sum". To rank whole requests instead, filter by Category equals REQUEST and sort by "Elapsed time > Sum".

The Code Profiler is a Business Manager module that shows where server-side processing time goes in your custom code. The profiler ranks requests and functions by the processing time they use, so you know where optimizing will pay off most. The Code Profiler works best after page caching has been checked and fixed.

How to check page caching before you profile

Use the Code Profiler after you optimize page caching. Requests served from the page cache don't create load on the application or storage layers, so caching problems come first.

  1. Open the "Technical" tab in "Reports & Dashboards".
  2. Sort by the top contributors to overall processing time.
  3. For each top endpoint, check the last column (always dynamically calculated). An endpoint that shows 100 percent there is uncached.
  4. Check and fix the caching for each uncached endpoint before you start profiling.

Fixing caching changes the processing times, so profile the updated numbers rather than the old ones.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a problem or performance issue and data, use relevant tools to inspect code performance and determine and implement solutions (cache configuration, profilers, etc.) to resolve this issue

0/11

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers. 796 members and growing.