#are astro pages built parallaly or sequentially?

3 messages · Page 1 of 1 (latest)

lethal nest
#

does the astro build command build the pages in parallel or in sequence?

round questBOT
#

Hi @lethal nest. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Astro builds pages sequentially by default.

The config option build.concurrency controls how many pages are built in parallel. Its default is 1, meaning pages are rendered one at a time unless you explicitly increase this value in your astro.config.* file. [build.concurrency]

So:

  • astro build by default builds pages in sequence.
  • You can opt into limited parallelism by setting, for example:
// astro.config.mjs
export default {
  build: {
    concurrency: 2, // build up to 2 pages in parallel
  },
};

Again, the docs recommend not changing this in most cases. [build.concurrency]

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: