Logo
    Search

    database optimization

    Explore "database optimization" with insightful episodes like "708: How We Made Syntax.fm Faster", "Fundamentals × What Makes a Website Slow?", "Hasty Treat - What is the n+1 problem?" and "Hasty Treat - 5 Things That Make Your Site Slow" from podcasts like ""Syntax - Tasty Web Development Treats", "Syntax - Tasty Web Development Treats", "Syntax - Tasty Web Development Treats" and "Syntax - Tasty Web Development Treats"" and more!

    Episodes (4)

    708: How We Made Syntax.fm Faster

    708: How We Made Syntax.fm Faster

    In this episode of Syntax, Wes and Scott talk through the ways they improved performance on the Syntax.fm website, how they knew it was slow to begin with, and the various changes they made to caching, and loading transcripts to improve the speed of the site.

    Show Notes

    • 00:25 Welcome
    • 01:32 Adding a database requires queries
    • 03:32 How did we know the site was slow?
    • 04:25 Syntax Brought to you by Sentry
    • 07:45 Changing the way transcripts are being loaded
    • 13:41 Caching
    • 21:16 Caching Headers

    Hit us up on Socials!

    Syntax: X Instagram Tiktok LinkedIn Threads

    Wes: X Instagram Tiktok LinkedIn Threads

    Scott: X Instagram Tiktok LinkedIn Threads

    Fundamentals × What Makes a Website Slow?

    Fundamentals × What Makes a Website Slow?

    In this episode of Syntax, Wes and Scott talk through all the reasons your website might be slow, and how you can troubleshoot a slow website such as issues on the server, large assets, caching, CSS, JavaScript, latency, and more.

    Sentry - Sponsor

    If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up.

    Show Notes

    ××× SIIIIICK ××× PIIIICKS ×××

    Shameless Plugs

    Tweet us your tasty treats

    Hasty Treat - What is the n+1 problem?

    Hasty Treat - What is the n+1 problem?

    In this Hasty Treat, Scott and Wes talk about a common problem you’ll encounter in your development career — the n+1 problem.

    Hasura - Sponsor

    With Hasura, you can get a fully managed, production-ready GraphQL API as a service to help you build modern apps faster. You can get started for free in 30 seconds, or if you want to try out the Standard tier for zero cost, use the code “TryHasura” at this link: hasura.info. We’ve also got an amazing selection of GraphQL tutorials at hasura.io/learn.

    Sentry - Sponsor

    If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up.

    Show Notes

    05:00 - What is the n+1 problem?

    • The N+1 problem can happen in any language but is especially prevalent in GraphQL because it’s so easy to query relationships.

    09:33 - The solution

    • The solution to the n+1 problem is to batch the queries. As you loop over each podcast, keep an array of host IDs to lookup. Once you have looped over the podcasts, make a single query to the database with your large array of podcast host Ids.

    11:11 - Should you care?

    Tweet us your tasty treats!

    Hasty Treat - 5 Things That Make Your Site Slow

    Hasty Treat - 5 Things That Make Your Site Slow

    In this Hasty Treat, Scott and Wes talk about five things that could potentially be making your website slow.

    LogRocket - Sponsor

    LogRocket lets you replay what users do on your site, helping you reproduce bugs and fix issues faster. It’s an exception tracker, a session re-player and a performance monitor. Get 14 days free at logrocket.com/syntax.

    Show Notes

    3:00 - TTFB

    • Slow DNS lookup
    • Server on the other side of the world
    • Slow server processing
    • Network speed back to the browser

    6:21 - Requests

    • Too many requests
    • Too large
    • Waterfalling your requests

    9:44 - Assets are too large

    • Images are the biggest bloat in a site
    • Compress and optimize via build tool or ImageOptim
    • Make smaller
    • Picture fill for mobile

    14:48 - Lazy loading

    • lazy=“true”
    • Intersection observer
    • Preload slider images two ahead

    18:03 - Not using a CDN

    • What is a CDN?
    • Cloudflare is free, others are very cheap - we used Cloudfront
    • Netlify is free and comes with a CDN

    Links

    Tweet us your tasty treats!