PB-2603: Slow shortcode or block
Paul Bunyan code PB-2603 (Warning): Slow shortcode or block. What it means and what to do.
On this page
What it means
One shortcode, block or page-builder module took longer than the slow-hook threshold to build, not counting the shortcodes and blocks inside it.
Divi modules are shortcodes, so they are timed the same way. This code was added in version 1.1.6. It is on by default; turn it off with "Time shortcodes and blocks" in Settings.
What to do
The message names it and gives its plugin, file and line. "Inside" shows how the time splits between queries, outside calls, email and plain PHP. If it is your own code, time the suspect part with paul_bunyan_scope() to find the slow loop.
Common causes
- A shortcode or block that runs its own query, such as related products, recent posts or a filtered list.
- Page-builder modules (Divi modules are shortcodes) that load data or render many nested items.
- Embeds and widgets that call another service while the page is built.
- A shortcode used many times on one page.
How to find and fix it
- The message names the shortcode or block, its plugin, file and line, and how its own time splits between queries, outside calls, email and plain PHP. Shortcodes and blocks inside it are counted separately.
- Lists and grids: limit the number of items or cache the output for a few minutes.
- Outside calls: cache the answer or load it after the page with JavaScript.
- Your own shortcode: time the suspect part with
paul_bunyan_scope()to find the slow loop.
Details
| Code | Severity | Group |
|---|---|---|
| PB-2603 | Warning | Code |
