Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Happy with Cloudflare Pages but its build takes too long. 2 minutes for "initializing build environment", and <5 seconds for actual build...


A quick-build feature is in beta; with it, the build env init takes 1–2 seconds, and a Hugo build of a 200-or-so-page site is all done in less than a minute. Existing CFP users can ask to be put on the beta:

https://discord.com/channels/595317990191398933/922968777988...


Dumb question, why build the site on the server? Shouldn’t the site generate on your laptop and then upload the static content to the server? It just seems to me that building on server adds a lot of complexity.


Cloudflare pages, right now, seems to be both the actual hosting, as well as a system for continuous deployment, bundled into one product. You push updates to GitHub, it runs your build (can be any arbitrary script) and then you tell it the folder that contains the built site at the end.

So you could totally build everyting locally and commit the site into a Git repo and use it in that way. It would be nice to have a non-GitHub way to just shove my built website into CF Pages but I don't know if that is on the roadmap.


True but you often want people to make updates that can only either edit markdown files or use some frontend that then calls the build process. (marketing people, copywriters etc). When you're a hacker who knows how to install dependencies and don't have to use other machines sure.


Or if you just want to make a quick typo fix on your phone on GitHub…


That’s what we do, more or less: our build step is a no-op and we simply point Cloudflare Pages to the static site directory in the repo where everything is pre-rendered.

Deployments are still painfully slow.


Cloudflare Pages is a continuous deployment wrapper on top of Cloudflare Workers. You can choose to use Workers instead, and the workflow will look more like "upload this folder as my site" (local command, no waiting for a cloud builder).

Pages is also missing some Workers features, like being able to see logs, Unbundled Workers for >50ms server-side processes, etc.


Agreed, I wonder if it's poorly engineered and that 2 minutes is spent spinning up an Ubuntu VM on GCP

You can ask "Walshy" in the Cloudflare Developers Discord and he can give you access to a feature called "fast builds" it's in beta at the moment.


I think it is because the container it spins up is a bit heavy. When you select a framework, it just sets a build command. It seems as though every framework and tool is installed in that build container.


Hey, I’m on Cloudflare’s Developer Advocacy team — this is a top priority for the Pages team right now and big improvements to the build time are being actively worked on!


I made the same comment on Twitter and the pm for Workers said that they are aware and are actively working on it. So I am optimistic it will improve significantly over the coming months.


I agree... I run my static generator on my machine, then just publish pure HTML/CSS/JS (so there's no build step on Cloudflar) and it still takes 2 minutes to "build"... on GitHub Pages, the same setup deploys live within a few seconds of pushing my changes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: