News for hackers. Stuff that matters.
Re:Hosting SQLite databases on GitHub Pages or any static fi... by city41 on Sunday May 02, 2021 @03:22PM (#27018099)
I'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.

Re:Hosting SQLite databases on GitHub Pages or any static fi... by nindalf on Sunday May 02, 2021 @04:28PM (#27018722)
You 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!'
Re:Hosting SQLite databases on GitHub Pages or any static fi... by lsmurray on Sunday May 02, 2021 @09:35PM (#27020761)
I generate my entire blog on nextjs from a sqlite data base already. 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

Re:Hosting SQLite databases on GitHub Pages or any static fi... by altano on Sunday May 02, 2021 @11:58PM (#27021481)
For 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-...
Re:Hosting SQLite databases on GitHub Pages or any static fi... by throw123123123 on Monday May 03, 2021 @12:59AM (#27021756)
Its 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.

Re:Hosting SQLite databases on GitHub Pages or any static fi... by gitgud on Sunday May 02, 2021 @07:51PM (#27020160)
Generating 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...

Re:Hosting SQLite databases on GitHub Pages or any static fi... by nicoburns on Sunday May 02, 2021 @08:10PM (#27020290)
Hugo claims <1ms a page. Which would mean 20k pages in under 20 seconds. 20k pages in 20 mins is not fast!
Re:Hosting SQLite databases on GitHub Pages or any static fi... by gawin on Sunday May 02, 2021 @09:30PM (#27020743)
Confirmed: 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.

Re:Hosting SQLite databases on GitHub Pages or any static fi... by city41 on Sunday May 02, 2021 @08:16PM (#27020326)
Oops, my memory was off. It's 10,925 pages and the last build took 18 minutes.