← All articles

October 10, 2026 · Muhammad Umar · More by Muhammad Umar

Shopify Says TTFB Is a Liquid Rendering Problem

Shopify's own theme docs say TTFB is almost always a Liquid problem — here's the ranked list of causes and fixes they document.

Shopify Says TTFB Is a Liquid Rendering Problem — ASSOSIATIX Journal

TTFB Is Liquid Time, Not Network Time

Shopify's theme performance documentation is specific about what determines Time to First Byte (TTFB) on a storefront: the time Shopify spends executing Liquid code directly determines it, and TTFB is the foundation on which all other performance metrics are built. Client-side optimizations — deferred scripts, image loading strategies, font-swap fixes — don't touch it. Only reducing how long Liquid takes to render does.

There's a wrinkle worth knowing before trusting a TTFB reading: Shopify streams most page responses, starting with the top of the head before sections finish rendering. When that happens, a tool's TTFB figure covers only the head — the rest of the Liquid wait still happens, it just shows up in the page's download time instead. A good TTFB number on a streamed page doesn't mean the Liquid underneath is fast.

The High-Impact Causes

Shopify's documentation names deeply nested Liquid loops — loops nested across products, variants, or options — as the most common cause of high TTFB, because they grow quadratically with catalog size: a theme fast on 10 products can be slow on 100. Eliminating these O(n squared) patterns is rated High impact.

Two more causes share that High rating. Metafield access inside loops — particularly variant-level metafield checks — should move outside the loop entirely, with theme settings preferred over metafields for static data. And over-fetching product variants, by iterating all of them instead of just what the initial render needs, forces expensive database queries. A for loop's limit parameter, which caps what collection.products and collections fetch, also carries a High rating for the same reason.

The Medium and Low-Impact List

Below those, Shopify grades a longer set of fixes Medium impact: keeping pagination under 25,000 objects, flattening nested render and include calls (especially inside loops), deferring expensive Liquid in dialogs and drawers until they're opened, deferring child product data in combined listings through the Section Rendering API, filtering collections before loops run rather than inside them, and moving repeated assign and filter calls outside loops so they run once instead of per iteration.

A smaller set of Low-impact fixes — caching repeated filter results with assign, assigning block.settings to a variable instead of re-accessing it, and preferring echo over append or prepend for string output — round out the list.

Profile First

Shopify's guidance for finding which of these actually apply to a given theme is specific: run the Shopify Theme Inspector for Chrome to identify which Liquid lines are slowest before optimizing anything. The impact ratings above are relative rankings Shopify assigns across themes in general, not a guarantee of what any one theme will gain — profiling tells you which patterns are actually present in your Liquid before you spend time removing them.

Sources

SEO & Performance

ASSOSIATIX works on this every day. See our Shopify Conversion & Performance Optimization service

$./start-project.sh

READY TO BUILD
WHAT'S NEXT?

Tell us where you are and where you want to go. We'll help you choose the right path—storefront, system, product, or a focused growth sprint.