By late 2024, choosing between two architectural approaches in the Shopify ecosystem became mandatory: the traditional Liquid template engine or Hydrogen. We don't make this decision on assumptions — we compare TTFB, build time, developer velocity, and migration cost with actual metrics. This article explains which numbers we tracked and which tradeoffs we accepted.
Liquid: Monolithic Speed, Limited Flexibility
Liquid is Shopify's template engine since 2006. Server-rendered, CDN-cached, running on Shopify's own Oxygen infrastructure. Our benchmark data:
Average TTFB: 180–220ms (from Oxygen CDN edge)
Build time: None — rendering happens at request time
Cache HIT ratio: 82% (for static pages)
Liquid's advantage isn't speed; it's simplicity. You hire a theme developer, populate sections/ and snippets/ folders, edit content from Shopify admin. No frontend build pipeline, no npm dependencies. But flexibility is zero: for client-side interactivity, you add <script> tags and rely on Alpine.js or Petite Vue. No component library, no state management.
Personalization in Liquid depends on Shopify's customer object. For dynamic pricing or recommendation widgets, you bypass CDN cache and hit the server — TTFB jumps from 180ms to 400–600ms. At this point, Liquid's speed advantage evaporates.
Liquid's Tradeoff: Developer Velocity
Adding a feature requires:
- Find a developer who writes Liquid syntax (niche skill)
- Add a Shopify theme app extension or custom section
- Test with Shopify theme preview (no local dev server)
- Deploy via GitHub sync or Shopify CLI
Average feature delivery: 3–5 days (for a basic section). Setting up A/B tests, adding analytics events, optimizing third-party scripts — each is separate work. No TypeScript, no component reuse mechanism, no unit test framework.
Hydrogen: React, Remix, Edge SSR
Hydrogen is Shopify's headless framework introduced in 2021 — React-based, built on Remix, running on the Oxygen edge network. Our production data:
Average TTFB: 90–140ms (edge SSR, cache HIT)
Build time: 45–70 seconds (Remix build + Oxygen deploy)
Cache MISS TTFB: 250–350ms (including Storefront API query latency)
Hydrogen's key advantage is the component-based architecture. You leverage React's ecosystem: Radix UI, Framer Motion, React Query. Handle state management with Zustand or Jotai. Native TypeScript support, Vite dev server with 200–400ms HMR.
Example — product card component in Hydrogen:
// app/components/ProductCard.tsx
import {Image, Money} from '@shopify/hydrogen';
import type {Product} from '@shopify/hydrogen/storefront-api-types';
export function ProductCard({product}: {product: Product}) {
return (
<div className="product-card">
<Image data={product.featuredImage} sizes="(min-width: 768px) 33vw, 100vw" />
<h3>{product.title}</h3>
<Money data={product.priceRange.minVariantPrice} />
</div>
);
}
Same component in Liquid:
{% comment %} sections/product-card.liquid {% endcomment %}
<div class="product-card">
{{ product.featured_image | image_url: width: 800 | image_tag }}
<h3>{{ product.title }}</h3>
<span>{{ product.price | money }}</span>
</div>
The difference isn't syntax — in Hydrogen, you import this component elsewhere and reuse it with PropTypes type safety and Storybook documentation. In Liquid, you include the snippet each time and pass variables — refactoring becomes painful.
Migration Cost: Hourly Breakdown
Migrating an e-commerce site involves three cost categories:
- Template migration: Liquid → JSX conversion
- Data fetching refactor: Theme → Storefront API queries
- Third-party integrations: Pixels, analytics, review widgets
Our actual figures:
| Metric | 50-page site | 200-page site |
|---|---|---|
| Dev hours (migration) | 120–180 | 400–600 |
| QA hours | 40–60 | 120–180 |
| Downtime | 0 (staging deploy) | 0 |
| Risk level | Low | Medium (SEO URL control) |
The largest cost isn't infrastructure — it's developer skill set transition. A Liquid developer doesn't write Hydrogen. You hire a React-skilled frontend developer or upskill your team. Average salary difference: Liquid dev ~USD 2,400–3,600/month, React dev ~USD 4,200–6,000/month.
Storefront API Query Latency
Hydrogen sends GraphQL queries to Shopify's Storefront API. In Liquid, server-side data access is free (same monolithic app); in Hydrogen, there's a network hop. Example query:
query ProductPage($handle: String!) {
product(handle: $handle) {
id
title
description
priceRange {
minVariantPrice { amount currencyCode }
}
images(first: 10) {
nodes { url altText }
}
}
}
This query travels from Oxygen edge to Shopify backend — average latency 80–120ms. Liquid has no latency because data is in-memory. But Hydrogen's cache strategy closes this gap:
// app/routes/products.$handle.tsx
export async function loader({params, context}: LoaderFunctionArgs) {
const {product} = await context.storefront.query(PRODUCT_QUERY, {
variables: {handle: params.handle},
cache: context.storefront.CacheLong(), // 1-hour cache
});
return json({product});
}
CacheLong() caches the same query at the edge for 1 hour — subsequent requests see sub-10ms latency.
Developer Velocity Comparison
Implementing the same feature in both architectures: "Show dynamic upsell widget for product added to cart."
Liquid approach:
- Write custom app (Shopify App Bridge)
- Add app extension as snippet
- Hit recommendation engine API via Ajax
- Render response to DOM
Timeline: 3–4 days (including testing)
Hydrogen approach:
- Write React component (CartUpsell.tsx)
- Fetch cart data from
useCarthook - Query recommendation API (React Query)
- Import component into cart route
Timeline: 4–6 hours
Where's the gap: Hydrogen has TypeScript type safety, testable components, and Storybook-based isolated development. Liquid requires manual testing through theme preview for every change.
Real project data (Roibase client): a personalization feature that took 1 sprint (2 weeks) in Liquid shipped in 3 days with Hydrogen — that's the headless commerce architecture contribution to dev velocity.
Web Performance: Core Web Vitals Gap
Shopify's 2025 Q1 report: average Liquid theme LCP is 2.4 seconds, Hydrogen site LCP is 1.8 seconds (mobile, 4G). Our production data:
| Metric | Liquid (theme) | Hydrogen |
|---|---|---|
| TTFB | 210ms | 130ms |
| LCP | 2.6s | 1.9s |
| TBT | 420ms | 180ms |
| CLS | 0.08 | 0.02 |
Hydrogen's performance advantage comes from three sources:
- Edge SSR: Oxygen edge runs on Cloudflare-like global PoPs — renders HTML closest to the user
- Streaming SSR: Remix's streaming support renders above-fold content immediately, lazy-loads below-fold
- Optimized bundle: Vite build includes automatic code splitting, tree shaking, dynamic imports — JS bundle is 40% smaller
Example: product grid lazy loading (Hydrogen):
// app/routes/collections.$handle.tsx
import {Await} from '@remix-run/react';
import {Suspense} from 'react';
export async function loader({params, context}: LoaderFunctionArgs) {
const productsPromise = context.storefront.query(PRODUCTS_QUERY, {
variables: {handle: params.handle},
});
return defer({products: productsPromise}); // Stream promise
}
export default function Collection() {
const {products} = useLoaderData<typeof loader>();
return (
<Suspense fallback={<ProductGridSkeleton />}>
<Await resolve={products}>
{(data) => <ProductGrid products={data.products} />}
</Await>
</Suspense>
);
}
This pattern sends above-fold HTML immediately and hydrates on the client — the LCP drop from 2.6s to 1.9s comes from this.
Decision Matrix: When to Choose Which
Our decision tree:
Choose Liquid if:
- Annual GMV <$2M
- Fewer than 4 deploys per month
- No personalization requirements
- Current team is Shopify theme developers
Choose Hydrogen if:
- Annual GMV >$5M
- 2+ feature deploys per week
- A/B testing, personalization, headless CMS integrations planned
- Capacity to invest in modern frontend stack
Grey zone ($2–5M GMV): examine conversion rate, AOV, and repeat purchase metrics. If your CRO roadmap is aggressive, migrate to Hydrogen — the developer velocity difference pays back in ROI.
Conclusion: Accepting Tradeoffs Deliberately
Hydrogen is 35–40% faster than Liquid (TTFB and LCP), developer velocity is 3–5x higher, but migration costs 120–600 hours. Whether you make this investment depends on your operational velocity goals.
Our project experience: the average e-commerce client breaks even on Hydrogen migration within 6–9 months — CRO iteration speed increases, A/B test cycle time drops, third-party integration delivery accelerates. If rapid growth is the target, Hydrogen migration is numbers-backed. If you're publishing a static catalog, Liquid is sufficient.