3
6 Comments

Long build times?

Often the main problem I see folks complain about with the Jamstack is long build times. I do think that there are a few solutions to this, like microsites and rendering certain pages with serverless functions, but are there ones that you've decided are the right solution for you? Are there some that you think aren't a good idea?

  1. 2

    How long is too long? My gatsby site builds in about 2-3 minutes on Netlify and I'm fine with that.

    1. 1

      Some folks I know with thousands of pages have a LOT longer, like 10+ minutes, and more. My personal projects luckily also top off at like no more than 5 minutes.

      1. 1

        Gotcha. I'm at just over 1k pages now, but will watch out as that grows.
        If you come across any tips on how to speed it up, please let us know!

  2. 1

    There’s a conditional page builds feature in Gatsby.

    It’s experimental and I’ve never actually used it before myself, but it could be a solution for some cases.

    Link: https://www.gatsbyjs.com/docs/conditional-page-builds/

  3. 1

    @cassidoo what do you think about hybrid SSG/SSR setups like Next allows? could it solve that issue for most?

    1. 2

      Hmm, it does, but it still comes with tradeoffs. Atomic deploys are one of the key things that make Jamstack super nice, being able to rollback without a rebuild in one click. The incremental static regeneration stuff that is in Next.js breaks that model, because the caching of that newly built page is separate from the rest of the bundle, and so users could get stale pages. I think with a different caching strategy that kind of stuff would solve this well, but it's a hard problem to solve.

Trending on Indie Hackers
Getting first 908 Paid Signups by Spending $353 ONLY. 24 comments I talked to 8 SaaS founders, these are the most common SaaS tools they use 20 comments What are your cold outreach conversion rates? Top 3 Metrics And Benchmarks To Track 19 comments How I Sourced 60% of Customers From Linkedin, Organically 12 comments Hero Section Copywriting Framework that Converts 3x 12 comments Join our AI video tool demo, get a cool video back! 12 comments