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
Passed $7k 💵 in a month with my boring directory of job boards 51 comments Reaching $100k MRR Organically in 12 months 35 comments How I got 1,000+ sign-ups in less than a month with social media alone 19 comments 87.7% of entrepreneurs struggle with at least one mental health issue 14 comments How to Secure #1 on Product Hunt: DO’s and DON'Ts / Experience from PitchBob – AI Pitch Deck Generator & Founders Co-Pilot 12 comments Competing with a substitute? 📌 Here are 4 ad examples you can use [from TOP to BOTTOM of funnel] 10 comments