Blockstudio
Dev

Performance Profiler

Blockstudio includes a lightweight profiler that tracks render performance across the entire pipeline. It shows per-block timings, phase breakdowns, and cache hit rates.

Activation

Add ?blockstudio-perf to any frontend URL:

https://example.com/my-page/?blockstudio-perf

Or enable it permanently in blockstudio.json:

blockstudio.json
{
  "dev": {
    "perf": true
  }
}

Or via filter:

add_filter('blockstudio/settings/dev/perf', '__return_true');

The profiler only outputs data for logged-in users with edit_posts capability.

Output

Debug panel

A fixed panel appears at the bottom of the page with a table showing every tracked metric, its duration, and call count.

Server-Timing headers

Timing data is also sent as Server-Timing HTTP headers, visible in the browser DevTools Network tab under the "Timing" section. This works even if the page HTML is cached by a CDN.

Tracked metrics

MetricDescription
totalTotal Blockstudio processing time
block-tagsBlock tag parser (<bs:> and <block> replacement)
assetsAsset discovery and injection
tailwindTailwind CSS compilation
phase:transformAttribute transformation (per block render)
phase:templatePHP/Twig template compilation (per block render)
phase:twigTwig-specific compilation (per block render)
phase:componentsComponent replacement: InnerBlocks, RichText, useBlockProps (per block render)
block:{name}Individual block type render time with call count

Render cache

Self-closing block tags (no inner content) are cached in memory during page rendering. When the same block with identical attributes appears multiple times, subsequent renders are served from cache. The cache is per-request and cleared after the page finishes rendering.

The profiler shows reduced render call counts when the cache is active, making it easy to verify caching is working.

On this page