5 ms·
I'm curious, in what manner could this method speed up Next.js builds? That's all done locally, which negates the effect of HTTP range requests, right?
by mvanaltvorst 5y ago
I'm curious, in what manner could this method speed up Next.js builds? That's all done locally, which negates the effect of HTTP range requests, right?
- city41 5y agoI'm guessing they mean rather than build a static Next site that generates 10k+ pages (or whatever large means in the given context), it instead creates one page that just queries the data from the client. I have one Next static site that has about 20k pages and takes about 20 minutes to build and deploy. I think that's an acceptable build time. But I do know of other people around the net who have mentioned having sites with 20k-ish pages taking an hour+ to build. For them I could see the desire to try this sqlite trick.
- nindalf 5y agoYou should write a post about this if you implement it. My humble suggestion for blog post title - 'Speed up your Next.js builds with this author's one weird trick! Vercel hates him!'
- lsmurray 5y agoI generate my entire blog on nextjs from a sqlite data base already. https://lsmurray.com/blog/database-first-development https://lsmurray.com/blog/database-first-development It’s got a ton of rough edges but the boilerplate is there to get a proof of concept pretty quickly
- gitgud 5y agoGenerating 20k pages in 20mins is impressive, 16 pages a second on average. In my experience, it can take a couple of minutes just to deploy 20 pages, but that could just be the overhead of Typescript and SASS compilation too...
- nicoburns 5y agoHugo claims <1ms a page. Which would mean 20k pages in under 20 seconds. 20k pages in 20 mins is not fast!
- gawin 5y agoConfirmed: Build a 30k pages site with Hugo in 53 seconds, including grabbing JSON content from Contentful and deploy on AWS S3. Took some effort to get everything under 60 seconds, speed was the main reason to use Hugo.
- city41 5y agoOops, my memory was off. It's 10,925 pages and the last build took 18 minutes.
- altano 5y agoFor really large sites Next.js already has Incremental Static Regeneration which is usually the right solution to fast [re]builds: https://www.smashingmagazine.com/2021/04/incremental-static-regeneration-nextjs/ https://www.smashingmagazine.com/2021/04/incremental-static-...
- throw123123123 5y agoIts not the same because you have to rebuild all the pages if you change your data source. In this implementation you can upload a new data set and it will work. Its just a different stack.