Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Liquid Diet: Optimising Shopify Theme Performance

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Liquid Diet: Optimising Shopify Theme Performance

Avatar for Ryan Townsend

Ryan Townsend

January 27, 2026
Tweet

More Decks by Ryan Townsend

Other Decks in Programming

Transcript

  1. • Leeds-based • >20 years in web development, primarily eCommerce

    & SaaS • Co-founded SHIFT Commerce, 10 years as CTO • Now: Fractional CTO / Web Consultant • Lifter, Foodie, Coffee, Wine, Travel
  2. • Why should we care about web performance • How

    we measure & monitor web performance • Laying stable foundations • Optimisations techniques & footguns to avoid
  3. Permanent Abandonment Rate 0% 10% 20% 30% 40% Unavailable Slow

    28% 9% Source: Akamai, The Impact of Web Performance on E - Retail Success
  4. C arp e impr o ved LARGEST CONTENTFUL PAINT (LCP)

    b y 52% a n d CUMULATIVE LAYOUT SHIFT (CLS) b y 41% and s a w a 10% i n cre a s e in t r af fi c , a 5% in c re a se i n o n l i ne s t ore c on v er sio n r a te , an d a 15% i n c r e a se i n re v en ue . Source: Shopify via WPOStats
  5. 2020 s 2000 s Time To First Byte Full Page

    Load Time Largest Contentful Paint Cumulative Layout Shift Interaction to Next Paint
  6. LCP CLS INP LARGEST CONTENTFUL PAINT CUMULATIVE LAYOUT SHIFT INTERACTION

    TO NEXT PAINT VISUAL STABILITY LOAD TIME RESPONSIVENESS
  7. Metric Good Needs Improvement Poor LCP < 2.5s 2.5 –

    4s > 4s CLS < 0.1 0.1 – 0.25 > 0.25 INP < 200ms 200 – 500ms > 500ms (at the 75th percentile)
  8. LCP

  9. CLS

  10. INP

  11. cruxvis.withgoogle.com 4% from reloading page 2:1 ratio of going back/forward

    being cached vs requiring new HTML 30% instant, thanks to Speculation Rules pre-rendering
  12. How does your machine compare to the real world? Bandwidth

    / CPU time attribution Useful data and insights
  13. “ s t a r t w i t h

    a t h e m e t h a t a l r e a d y h a s g o o d p er f o r m a nc e a s i t ’ s h ar d t o o p timiz e a t h e m e t ha t h a s b a d p e r f o r m a n c e w i t h o u t a l o t o f c o s t l y c us t omi z a t ion s " Sia Karamalegos, ThemeVitals.com
  14. “A l w a y s p u t y

    ou r cli e n t and t h e u s er f ir s t . D o n ' t impl e men t s o me th in g jus t b e c a us e y o u ' re c o mf or t abl e with a p a r t i c u l ar a p p , theme , or t e c h n o l o g y : ch oos e t h e s o l u t i o n t h a t k e e p s t h e s t o r e f a s t , s i m p l e , r e l i a b l e , a n d a l i g n e d w i t h t h e b u s i n e s s n e e d s . O p t imi z e f or UX, n o t DX" Estela Franco, Senior Technical Architect for Web Performance @ Shopify
  15. BEFORE AFTER • Huge client-side JS framework • Missing user

    feedback • Endless routing library churn • CSS-only for cross-document • 1 JS call for same-document • Native browser user feedback See: developer.chrome.com/docs/web-platform/view-transitions
  16. CSS SCR oll -SNAP Z e r o J a

    v a S cr i p t See: web.dev/articles/css-scroll-snap & developer.chrome.com/blog/carousels-with-css
  17. SCR oll -LINKED ANIMATION Z e r o J a

    v a S cr i p t See: developer.chrome.com/docs/css-ui/scroll-driven-animations
  18. SCR oll -LINKED ANIMATION Z e r o J a

    v a S cr i p t (see also scroll-state() container queries) See: developer.chrome.com/blog/css-scroll-state-queries
  19. BEFORE AFTER • @radix-ui/react-accordion • react-modal • swiper.js • react-select

    • GSAP / Framer Motion • fl oating-ui • <details> • <dialog> & Command Invokers • CSS snapping & carousels • Customisable <select> • Scroll-driven Animation • Popovers, Interest Invokers, Anchor Positioning
  20. “I t m ight no t s o un d

    te ch i e or g l amor ou s , but one of th e main i ss u e s I f a ce is a g e n c i e s and d e ve l op er s o ft e n a d d i n g la yer s of c omp l e xi t y b y us i n g f ami l iar JAVASCRIPT l ibr ar ie s in s t ea d of le v er a g in g L i q u i d , c a u s i n g se ve r e web p er f ormance i s s ue s " Estela Franco, Senior Technical Architect for Web Performance @ Shopify
  21. • Ignoring the power of {% paginate %} to limit

    database time • Relying on looping through product.tags instead of assigning proper meta fi elds/ metaobjects • Assigning all the meta fi elds at variant- level rather than de-duping to product-level Mateusz Krzeszowiak, Lead Technical Architect, Performance @ Shopify
  22. <script type="speculationrules"> { "prefetch": [ { "source":"document", "where": { "selector_matches":

    ".c-product-card__heading a" }, "eagerness":"moderate" } ], "prerender": [ { "where": { "or": [ { "href_matches": "/products/*" }, { "href_matches": "/collections/*" }, { "href_matches": "/pages/*" }, { "href_matches": "/blogs/*" } ] }, "eagerness": "moderate" } ] } </script> See: developer.mozilla.org/en-US/docs/Web/API/Speculation_Rules_API