Profiling Slow Pages

Last edit: 

Contributors: 

This guide will show you how to profile a slow page to find performance issues.

Requirements

This is an advanced tutorial. To follow it, you should be familiar with basic platformOS concepts, Liquid, the topics in the Get Started section, and tutorials related to Pages.

Steps

Profiling a page is a one-step process:

  1. Enable profiling for a page

Step 1: Enable profiling for a page

Add enable_profiler: true to a yml file corresponding to the page you want to profile:

---
slug: my-slow-page
enable_profiler: true
---

{% include 'very_time_consuming_partial' %}

When the flag is set, whenever you trigger a request to the my-slow-page, two log entries will be added and accessible via the marketplace-kit logs command. The first one shows information about the page, the second one about the layout associated with the page. You can use this information to identify slow code and improve it.

Questions?

We are always happy to help with any questions you may have. Check out our Help page, or contact us.