Why does initializing the build environment for Pages take so long?

I’ve recently started using Cloudflare Pages to host a static site (I love it BTW).

There is one part of the build process which I just don’t understand though. It doesn’t really affect me, so I’m just more curious about it.

The “Initializing Build Environment” step takes about 2 minutes on each build, but there is nothing to build. I just need to clone a repo, and then deploy one of the folders as all the HTML/CSS/JS has been pre-generated.

I don’t know what happens during this phase, but if it were launching a docker container to prep the build, that should be pretty quick I would think. But, in my case, I don’t have any preset frameworks, or build commands. Based on that, I would think that any build setup other than setting up a Preview location would be unnecessary.

The build environment is big, it contains all tools for all languages. The build times are generally pretty quick (around 40 seconds) but they have been pretty slow the last 2 weeks. The team is working on a longer-term solution so that builds are always quick but it will take a bit of time.

You can keep up to date in the Discord - https://workers.community

Ah okay, thanks for the reply!

I was wondering if maybe everything was bundled in a single environment, or if it was case by case depending on the build commands/build templates.

I’m fine either way, because 2 minutes is nothing for something I only deploy weekly - it was just funny to see that 2 seconds to clone, 0s to build, 2 seconds to deploy - but 2 minutes getting ready to do all that :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.